--HG--
branch : dev
This commit is contained in:
Sebastien Ros 2010-11-16 16:57:28 -08:00
commit 133b1e9b92
2 changed files with 7 additions and 8 deletions

View File

@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Linq;
using Orchard.Environment.Extensions.Models;
using Orchard.Security.Permissions;
@ -29,7 +28,7 @@ namespace Orchard.Comments {
return new[] {
new PermissionStereotype {
Name = "Administrator",
Permissions = new[] {ManageComments}
Permissions = new[] {ManageComments, AddComment}
},
new PermissionStereotype {
Name = "Anonymous",
@ -37,19 +36,19 @@ namespace Orchard.Comments {
},
new PermissionStereotype {
Name = "Editor",
//Permissions = new[] {}
Permissions = new[] {AddComment}
},
new PermissionStereotype {
Name = "Moderator",
//Permissions = new[] {}
Permissions = new[] {AddComment}
},
new PermissionStereotype {
Name = "Author",
//Permissions = new[] {}
Permissions = new[] {AddComment}
},
new PermissionStereotype {
Name = "Contributor",
//Permissions = new[] {}
Permissions = new[] {AddComment}
},
};
}

View File

@ -10,8 +10,8 @@
</div>
}
@if (Model.CommentsActive == false) {
if (Model.Comments.Count > 0) {
@if (Model.ContentPart.CommentsActive == false) {
if (Model.ContentPart.Comments.Count > 0) {
<div id="comments">
<p class="comment-disabled">@T("Comments have been disabled for this content.")</p>
</div>