mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-15 14:54:57 +08:00
Merge
--HG-- branch : dev
This commit is contained in:
commit
133b1e9b92
@ -1,5 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using Orchard.Environment.Extensions.Models;
|
using Orchard.Environment.Extensions.Models;
|
||||||
using Orchard.Security.Permissions;
|
using Orchard.Security.Permissions;
|
||||||
|
|
||||||
@ -29,7 +28,7 @@ namespace Orchard.Comments {
|
|||||||
return new[] {
|
return new[] {
|
||||||
new PermissionStereotype {
|
new PermissionStereotype {
|
||||||
Name = "Administrator",
|
Name = "Administrator",
|
||||||
Permissions = new[] {ManageComments}
|
Permissions = new[] {ManageComments, AddComment}
|
||||||
},
|
},
|
||||||
new PermissionStereotype {
|
new PermissionStereotype {
|
||||||
Name = "Anonymous",
|
Name = "Anonymous",
|
||||||
@ -37,19 +36,19 @@ namespace Orchard.Comments {
|
|||||||
},
|
},
|
||||||
new PermissionStereotype {
|
new PermissionStereotype {
|
||||||
Name = "Editor",
|
Name = "Editor",
|
||||||
//Permissions = new[] {}
|
Permissions = new[] {AddComment}
|
||||||
},
|
},
|
||||||
new PermissionStereotype {
|
new PermissionStereotype {
|
||||||
Name = "Moderator",
|
Name = "Moderator",
|
||||||
//Permissions = new[] {}
|
Permissions = new[] {AddComment}
|
||||||
},
|
},
|
||||||
new PermissionStereotype {
|
new PermissionStereotype {
|
||||||
Name = "Author",
|
Name = "Author",
|
||||||
//Permissions = new[] {}
|
Permissions = new[] {AddComment}
|
||||||
},
|
},
|
||||||
new PermissionStereotype {
|
new PermissionStereotype {
|
||||||
Name = "Contributor",
|
Name = "Contributor",
|
||||||
//Permissions = new[] {}
|
Permissions = new[] {AddComment}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
@if (Model.CommentsActive == false) {
|
@if (Model.ContentPart.CommentsActive == false) {
|
||||||
if (Model.Comments.Count > 0) {
|
if (Model.ContentPart.Comments.Count > 0) {
|
||||||
<div id="comments">
|
<div id="comments">
|
||||||
<p class="comment-disabled">@T("Comments have been disabled for this content.")</p>
|
<p class="comment-disabled">@T("Comments have been disabled for this content.")</p>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user