diff --git a/src/Orchard.Specs/Bindings/ContentRights.cs b/src/Orchard.Specs/Bindings/ContentRights.cs index d796d2b09..75b5291b8 100644 --- a/src/Orchard.Specs/Bindings/ContentRights.cs +++ b/src/Orchard.Specs/Bindings/ContentRights.cs @@ -94,11 +94,11 @@ namespace Orchard.Specs.Bindings { private static Permission GetPermissionForAction(string action) { switch ( action ) { case "publish": - return Permissions.PublishContent; + return Permissions.PublishOthersContent; case "edit": - return Permissions.EditContent; + return Permissions.EditOthersContent; case "delete": - return Permissions.DeleteContent; + return Permissions.DeleteOthersContent; default: return null; } diff --git a/src/Orchard.Web/Core/Contents/Controllers/AdminController.cs b/src/Orchard.Web/Core/Contents/Controllers/AdminController.cs index e2824ee73..38f46d9e7 100644 --- a/src/Orchard.Web/Core/Contents/Controllers/AdminController.cs +++ b/src/Orchard.Web/Core/Contents/Controllers/AdminController.cs @@ -132,7 +132,7 @@ namespace Orchard.Core.Contents.Controllers { break; case ContentsBulkAction.PublishNow: foreach (var item in itemIds.Select(itemId => _contentManager.GetLatest(itemId))) { - if (!accessChecked && !Services.Authorizer.Authorize(Permissions.PublishContent, item, T("Couldn't publish selected content."))) + if (!accessChecked && !Services.Authorizer.Authorize(Permissions.PublishOthersContent, item, T("Couldn't publish selected content."))) return new HttpUnauthorizedResult(); accessChecked = true; @@ -143,7 +143,7 @@ namespace Orchard.Core.Contents.Controllers { break; case ContentsBulkAction.Unpublish: foreach (var item in itemIds.Select(itemId => _contentManager.GetLatest(itemId))) { - if (!accessChecked && !Services.Authorizer.Authorize(Permissions.PublishContent, item, T("Couldn't unpublish selected content."))) + if (!accessChecked && !Services.Authorizer.Authorize(Permissions.PublishOthersContent, item, T("Couldn't unpublish selected content."))) return new HttpUnauthorizedResult(); accessChecked = true; @@ -154,7 +154,7 @@ namespace Orchard.Core.Contents.Controllers { break; case ContentsBulkAction.Remove: foreach (var item in itemIds.Select(itemId => _contentManager.GetLatest(itemId))) { - if (!accessChecked && !Services.Authorizer.Authorize(Permissions.DeleteContent, item, T("Couldn't remove selected content."))) + if (!accessChecked && !Services.Authorizer.Authorize(Permissions.DeleteOthersContent, item, T("Couldn't remove selected content."))) return new HttpUnauthorizedResult(); accessChecked = true; @@ -187,7 +187,7 @@ namespace Orchard.Core.Contents.Controllers { var contentItem = _contentManager.New(id); - if (!Services.Authorizer.Authorize(Permissions.PublishContent, contentItem, T("Cannot create content"))) + if (!Services.Authorizer.Authorize(Permissions.PublishOthersContent, contentItem, T("Cannot create content"))) return new HttpUnauthorizedResult(); dynamic model = _contentManager.BuildEditor(contentItem); @@ -213,7 +213,7 @@ namespace Orchard.Core.Contents.Controllers { private ActionResult CreatePOST(string id, Action conditionallyPublish) { var contentItem = _contentManager.New(id); - if (!Services.Authorizer.Authorize(Permissions.PublishContent, contentItem, T("Couldn't create content"))) + if (!Services.Authorizer.Authorize(Permissions.PublishOthersContent, contentItem, T("Couldn't create content"))) return new HttpUnauthorizedResult(); _contentManager.Create(contentItem, VersionOptions.Draft); @@ -239,7 +239,7 @@ namespace Orchard.Core.Contents.Controllers { if (contentItem == null) return HttpNotFound(); - if (!Services.Authorizer.Authorize(Permissions.EditContent, contentItem, T("Cannot edit content"))) + if (!Services.Authorizer.Authorize(Permissions.EditOthersContent, contentItem, T("Cannot edit content"))) return new HttpUnauthorizedResult(); dynamic model = _contentManager.BuildEditor(contentItem); @@ -268,7 +268,7 @@ namespace Orchard.Core.Contents.Controllers { if (contentItem == null) return HttpNotFound(); - if (!Services.Authorizer.Authorize(Permissions.EditContent, contentItem, T("Couldn't edit content"))) + if (!Services.Authorizer.Authorize(Permissions.EditOthersContent, contentItem, T("Couldn't edit content"))) return new HttpUnauthorizedResult(); dynamic model = _contentManager.UpdateEditor(contentItem, this); @@ -293,7 +293,7 @@ namespace Orchard.Core.Contents.Controllers { public ActionResult Remove(int id, string returnUrl) { var contentItem = _contentManager.Get(id, VersionOptions.Latest); - if (!Services.Authorizer.Authorize(Permissions.DeleteContent, contentItem, T("Couldn't remove content"))) + if (!Services.Authorizer.Authorize(Permissions.DeleteOthersContent, contentItem, T("Couldn't remove content"))) return new HttpUnauthorizedResult(); if (contentItem != null) { @@ -315,7 +315,7 @@ namespace Orchard.Core.Contents.Controllers { if (contentItem == null) return HttpNotFound(); - if (!Services.Authorizer.Authorize(Permissions.PublishContent, contentItem, T("Couldn't publish content"))) + if (!Services.Authorizer.Authorize(Permissions.PublishOthersContent, contentItem, T("Couldn't publish content"))) return new HttpUnauthorizedResult(); _contentManager.Publish(contentItem); @@ -334,7 +334,7 @@ namespace Orchard.Core.Contents.Controllers { if (contentItem == null) return HttpNotFound(); - if (!Services.Authorizer.Authorize(Permissions.PublishContent, contentItem, T("Couldn't unpublish content"))) + if (!Services.Authorizer.Authorize(Permissions.PublishOthersContent, contentItem, T("Couldn't unpublish content"))) return new HttpUnauthorizedResult(); _contentManager.Unpublish(contentItem); diff --git a/src/Orchard.Web/Core/Contents/DynamicPermissions.cs b/src/Orchard.Web/Core/Contents/DynamicPermissions.cs index b1f42d39f..41ab490f7 100644 --- a/src/Orchard.Web/Core/Contents/DynamicPermissions.cs +++ b/src/Orchard.Web/Core/Contents/DynamicPermissions.cs @@ -9,19 +9,19 @@ using Orchard.Security.Permissions; namespace Orchard.Core.Contents { public class DynamicPermissions : IPermissionProvider { - private static readonly Permission PublishContent = new Permission { Description = "Publish or unpublish {0} for others", Name = "Publish_{0}", ImpliedBy = new[] { Permissions.PublishContent } }; + private static readonly Permission PublishContent = new Permission { Description = "Publish or unpublish {0} for others", Name = "Publish_{0}", ImpliedBy = new[] { Permissions.PublishOthersContent } }; private static readonly Permission PublishOwnContent = new Permission { Description = "Publish or unpublish {0}", Name = "PublishOwn_{0}", ImpliedBy = new[] { PublishContent, Permissions.PublishOwnContent } }; - private static readonly Permission EditContent = new Permission { Description = "Edit {0} for others", Name = "Edit_{0}", ImpliedBy = new[] { PublishContent, Permissions.PublishContent } }; + private static readonly Permission EditContent = new Permission { Description = "Edit {0} for others", Name = "Edit_{0}", ImpliedBy = new[] { PublishContent, Permissions.PublishOthersContent } }; private static readonly Permission EditOwnContent = new Permission { Description = "Edit {0}", Name = "EditOwn_{0}", ImpliedBy = new[] { EditContent, PublishOwnContent, Permissions.EditOwnContent } }; - private static readonly Permission DeleteContent = new Permission { Description = "Delete {0} for others", Name = "Delete_{0}", ImpliedBy = new[] { Permissions.DeleteContent } }; + private static readonly Permission DeleteContent = new Permission { Description = "Delete {0} for others", Name = "Delete_{0}", ImpliedBy = new[] { Permissions.DeleteOthersContent } }; private static readonly Permission DeleteOwnContent = new Permission { Description = "Delete {0}", Name = "DeleteOwn_{0}", ImpliedBy = new[] { DeleteContent, Permissions.DeleteOwnContent } }; public static readonly Dictionary PermissionTemplates = new Dictionary { - {Permissions.PublishContent.Name, PublishContent}, + {Permissions.PublishOthersContent.Name, PublishContent}, {Permissions.PublishOwnContent.Name, PublishOwnContent}, - {Permissions.EditContent.Name, EditContent}, + {Permissions.EditOthersContent.Name, EditContent}, {Permissions.EditOwnContent.Name, EditOwnContent}, - {Permissions.DeleteContent.Name, DeleteContent}, + {Permissions.DeleteOthersContent.Name, DeleteContent}, {Permissions.DeleteOwnContent.Name, DeleteOwnContent} }; diff --git a/src/Orchard.Web/Core/Contents/Permissions.cs b/src/Orchard.Web/Core/Contents/Permissions.cs index 469c0f84a..139ba1cad 100644 --- a/src/Orchard.Web/Core/Contents/Permissions.cs +++ b/src/Orchard.Web/Core/Contents/Permissions.cs @@ -4,12 +4,12 @@ using Orchard.Security.Permissions; namespace Orchard.Core.Contents { public class Permissions : IPermissionProvider { - public static readonly Permission PublishContent = new Permission { Description = "Publish or unpublish content for others", Name = "PublishContent" }; - public static readonly Permission PublishOwnContent = new Permission { Description = "Publish or unpublish content", Name = "PublishOwnContent", ImpliedBy = new[] { PublishContent } }; - public static readonly Permission EditContent = new Permission { Description = "Edit content for others", Name = "EditContent", ImpliedBy = new[] { PublishContent } }; - public static readonly Permission EditOwnContent = new Permission { Description = "Edit content", Name = "EditOwnContent", ImpliedBy = new[] { EditContent, PublishOwnContent } }; - public static readonly Permission DeleteContent = new Permission { Description = "Delete content for others", Name = "DeleteContent" }; - public static readonly Permission DeleteOwnContent = new Permission { Description = "Delete content", Name = "DeleteOwnContent", ImpliedBy = new[] { DeleteContent } }; + public static readonly Permission PublishOthersContent = new Permission { Description = "Publish or unpublish content for others", Name = "PublishOthersContent" }; + public static readonly Permission PublishOwnContent = new Permission { Description = "Publish or unpublish own content", Name = "PublishOwnContent", ImpliedBy = new[] { PublishOthersContent } }; + public static readonly Permission EditOthersContent = new Permission { Description = "Edit content for others", Name = "EditOthersContent", ImpliedBy = new[] { PublishOthersContent } }; + public static readonly Permission EditOwnContent = new Permission { Description = "Edit own content", Name = "EditOwnContent", ImpliedBy = new[] { EditOthersContent, PublishOwnContent } }; + public static readonly Permission DeleteOthersContent = new Permission { Description = "Delete content for others", Name = "DeleteOthersContent" }; + public static readonly Permission DeleteOwnContent = new Permission { Description = "Delete own content", Name = "DeleteOwnContent", ImpliedBy = new[] { DeleteOthersContent } }; public static readonly Permission MetaListContent = new Permission { ImpliedBy = new[] { EditOwnContent, PublishOwnContent, DeleteOwnContent } }; @@ -18,11 +18,11 @@ namespace Orchard.Core.Contents { public IEnumerable GetPermissions() { return new [] { EditOwnContent, - EditContent, + EditOthersContent, PublishOwnContent, - PublishContent, + PublishOthersContent, DeleteOwnContent, - DeleteContent, + DeleteOthersContent, }; } @@ -30,15 +30,14 @@ namespace Orchard.Core.Contents { return new[] { new PermissionStereotype { Name = "Administrator", - Permissions = new[] {PublishContent,EditContent,DeleteContent} + Permissions = new[] {PublishOthersContent,EditOthersContent,DeleteOthersContent} }, new PermissionStereotype { Name = "Editor", - Permissions = new[] {PublishContent,EditContent,DeleteContent} + Permissions = new[] {PublishOthersContent,EditOthersContent,DeleteOthersContent} }, new PermissionStereotype { Name = "Moderator", - //Permissions = new[] {} }, new PermissionStereotype { Name = "Author", diff --git a/src/Orchard.Web/Core/Contents/Security/AuthorizationEventHandler.cs b/src/Orchard.Web/Core/Contents/Security/AuthorizationEventHandler.cs index 187fbde3f..af03f52eb 100644 --- a/src/Orchard.Web/Core/Contents/Security/AuthorizationEventHandler.cs +++ b/src/Orchard.Web/Core/Contents/Security/AuthorizationEventHandler.cs @@ -54,11 +54,11 @@ namespace Orchard.Core.Contents.Security } private static Permission GetOwnerVariation(Permission permission) { - if (permission.Name == Permissions.PublishContent.Name) + if (permission.Name == Permissions.PublishOthersContent.Name) return Permissions.PublishOwnContent; - if (permission.Name == Permissions.EditContent.Name) + if (permission.Name == Permissions.EditOthersContent.Name) return Permissions.EditOwnContent; - if (permission.Name == Permissions.DeleteContent.Name) + if (permission.Name == Permissions.DeleteOthersContent.Name) return Permissions.DeleteOwnContent; return null; } diff --git a/src/Orchard.Web/Core/Contents/Views/Content.ControlWrapper.cshtml b/src/Orchard.Web/Core/Contents/Views/Content.ControlWrapper.cshtml index c34821b5b..ae070a131 100644 --- a/src/Orchard.Web/Core/Contents/Views/Content.ControlWrapper.cshtml +++ b/src/Orchard.Web/Core/Contents/Views/Content.ControlWrapper.cshtml @@ -1,6 +1,6 @@ @using Orchard.ContentManagement; @using Orchard.Core.Contents; -@if (AuthorizedFor(Permissions.EditContent)) { +@if (AuthorizedFor(Permissions.EditOthersContent)) {
@Html.ItemEditLinkWithReturnUrl(T("Edit").Text, (ContentItem)Model.ContentItem)
@Display(Model.Child) diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/AdminMenu.cs b/src/Orchard.Web/Modules/Orchard.Blogs/AdminMenu.cs index 9443b91ee..d54c11dc2 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/AdminMenu.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/AdminMenu.cs @@ -26,16 +26,16 @@ namespace Orchard.Blogs { if (blogCount > 0 && singleBlog == null) { menu.Add(T("List"), "3", - item => item.Action("List", "BlogAdmin", new {area = "Orchard.Blogs"}).Permission(Permissions.MetaListBlogs)); + item => item.Action("List", "BlogAdmin", new {area = "Orchard.Blogs"}).Permission(Permissions.MetaListOwnBlogs)); } else if (singleBlog != null) menu.Add(T("Manage Blog"), "1.0", - item => item.Action("Item", "BlogAdmin", new { area = "Orchard.Blogs", blogId = singleBlog.Id }).Permission(Permissions.MetaListBlogs)); + item => item.Action("Item", "BlogAdmin", new { area = "Orchard.Blogs", blogId = singleBlog.Id }).Permission(Permissions.MetaListOwnBlogs)); if (singleBlog != null) menu.Add(T("Create New Post"), "1.1", item => - item.Action("Create", "BlogPostAdmin", new { area = "Orchard.Blogs", blogId = singleBlog.Id }).Permission(Permissions.PublishBlogPost)); + item.Action("Create", "BlogPostAdmin", new { area = "Orchard.Blogs", blogId = singleBlog.Id }).Permission(Permissions.PublishOwnBlogPost)); menu.Add(T("Create New Blog"), "1.2", item => diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs index 6d2ac2168..b91169970 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Controllers/BlogPostAdminController.cs @@ -29,7 +29,7 @@ namespace Orchard.Blogs.Controllers { public Localizer T { get; set; } public ActionResult Create() { - if (!Services.Authorizer.Authorize(Permissions.EditBlogPost, T("Not allowed to create blog post"))) + if (!Services.Authorizer.Authorize(Permissions.EditOwnBlogPost, T("Not allowed to create blog post"))) return new HttpUnauthorizedResult(); var blogPost = Services.ContentManager.New("BlogPost"); @@ -57,7 +57,7 @@ namespace Orchard.Blogs.Controllers { } public ActionResult CreatePOST(Action conditionallyPublish) { - if (!Services.Authorizer.Authorize(Permissions.EditBlogPost, T("Couldn't create blog post"))) + if (!Services.Authorizer.Authorize(Permissions.EditOwnBlogPost, T("Couldn't create blog post"))) return new HttpUnauthorizedResult(); var blogPost = Services.ContentManager.New("BlogPost"); @@ -81,7 +81,7 @@ namespace Orchard.Blogs.Controllers { //todo: the content shape template has extra bits that the core contents module does not (remove draft functionality) //todo: - move this extra functionality there or somewhere else that's appropriate? public ActionResult Edit(int blogId, int postId) { - if (!Services.Authorizer.Authorize(Permissions.EditBlogPost, T("Couldn't edit blog post"))) + if (!Services.Authorizer.Authorize(Permissions.EditOwnBlogPost, T("Couldn't edit blog post"))) return new HttpUnauthorizedResult(); var blog = _blogService.Get(blogId, VersionOptions.Latest); @@ -113,7 +113,7 @@ namespace Orchard.Blogs.Controllers { } public ActionResult EditPOST(int blogId, int postId, string returnUrl, Action conditionallyPublish) { - if (!Services.Authorizer.Authorize(Permissions.EditBlogPost, T("Couldn't edit blog post"))) + if (!Services.Authorizer.Authorize(Permissions.EditOwnBlogPost, T("Couldn't edit blog post"))) return new HttpUnauthorizedResult(); var blog = _blogService.Get(blogId, VersionOptions.Latest); @@ -184,7 +184,7 @@ namespace Orchard.Blogs.Controllers { [ValidateAntiForgeryTokenOrchard] public ActionResult Delete(int blogId, int postId) { //refactoring: test PublishBlogPost/PublishOthersBlogPost in addition if published - if (!Services.Authorizer.Authorize(Permissions.DeleteBlogPost, T("Couldn't delete blog post"))) + if (!Services.Authorizer.Authorize(Permissions.DeleteOwnBlogPost, T("Couldn't delete blog post"))) return new HttpUnauthorizedResult(); var blog = _blogService.Get(blogId, VersionOptions.Latest); @@ -203,7 +203,7 @@ namespace Orchard.Blogs.Controllers { [ValidateAntiForgeryTokenOrchard] public ActionResult Publish(int blogId, int postId) { - if (!Services.Authorizer.Authorize(Permissions.PublishBlogPost, T("Couldn't publish blog post"))) + if (!Services.Authorizer.Authorize(Permissions.PublishOwnBlogPost, T("Couldn't publish blog post"))) return new HttpUnauthorizedResult(); var blog = _blogService.Get(blogId, VersionOptions.Latest); @@ -222,7 +222,7 @@ namespace Orchard.Blogs.Controllers { [ValidateAntiForgeryTokenOrchard] public ActionResult Unpublish(int blogId, int postId) { - if (!Services.Authorizer.Authorize(Permissions.PublishBlogPost, T("Couldn't unpublish blog post"))) + if (!Services.Authorizer.Authorize(Permissions.PublishOwnBlogPost, T("Couldn't unpublish blog post"))) return new HttpUnauthorizedResult(); var blog = _blogService.Get(blogId, VersionOptions.Latest); diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Permissions.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Permissions.cs index e2cadb39e..3c4b790d8 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Permissions.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Permissions.cs @@ -4,28 +4,28 @@ using Orchard.Security.Permissions; namespace Orchard.Blogs { public class Permissions : IPermissionProvider { - public static readonly Permission ManageBlogs = new Permission { Description = "Manage blogs", Name = "ManageBlogs" };//q: Should edit_blog be ManageBlogs? + public static readonly Permission ManageBlogs = new Permission { Description = "Manage blogs", Name = "ManageBlogs" }; public static readonly Permission PublishOthersBlogPost = new Permission { Description = "Publish or unpublish blog post for others", Name = "PublishOthersBlogPost", ImpliedBy = new[] { ManageBlogs } }; - public static readonly Permission PublishBlogPost = new Permission { Description = "Publish or unpublish blog post", Name = "PublishBlogPost", ImpliedBy = new[] { PublishOthersBlogPost } }; + public static readonly Permission PublishOwnBlogPost = new Permission { Description = "Publish or unpublish own blog post", Name = "PublishOwnBlogPost", ImpliedBy = new[] { PublishOthersBlogPost } }; public static readonly Permission EditOthersBlogPost = new Permission { Description = "Edit any blog posts", Name = "EditOthersBlogPost", ImpliedBy = new[] { PublishOthersBlogPost } }; - public static readonly Permission EditBlogPost = new Permission { Description = "Edit own blog posts", Name = "EditBlogPost", ImpliedBy = new[] { EditOthersBlogPost, PublishBlogPost } }; + public static readonly Permission EditOwnBlogPost = new Permission { Description = "Edit own blog posts", Name = "EditOwnBlogPost", ImpliedBy = new[] { EditOthersBlogPost, PublishOwnBlogPost } }; public static readonly Permission DeleteOthersBlogPost = new Permission { Description = "Delete blog post for others", Name = "DeleteOthersBlogPost", ImpliedBy = new[] { ManageBlogs } }; - public static readonly Permission DeleteBlogPost = new Permission { Description = "Delete blog post", Name = "DeleteBlogPost", ImpliedBy = new[] { DeleteOthersBlogPost } }; + public static readonly Permission DeleteOwnBlogPost = new Permission { Description = "Delete own blog post", Name = "DeleteOwnBlogPost", ImpliedBy = new[] { DeleteOthersBlogPost } }; public static readonly Permission MetaListOthersBlogs = new Permission { ImpliedBy = new[] { EditOthersBlogPost, PublishOthersBlogPost, DeleteOthersBlogPost } }; - public static readonly Permission MetaListBlogs = new Permission { ImpliedBy = new[] { EditBlogPost, PublishBlogPost, DeleteBlogPost } }; + public static readonly Permission MetaListOwnBlogs = new Permission { ImpliedBy = new[] { EditOwnBlogPost, PublishOwnBlogPost, DeleteOwnBlogPost } }; public virtual Feature Feature { get; set; } public IEnumerable GetPermissions() { return new[] { ManageBlogs, - EditBlogPost, + EditOwnBlogPost, EditOthersBlogPost, - PublishBlogPost, + PublishOwnBlogPost, PublishOthersBlogPost, - DeleteBlogPost, + DeleteOwnBlogPost, DeleteOthersBlogPost, }; } @@ -42,15 +42,14 @@ namespace Orchard.Blogs { }, new PermissionStereotype { Name = "Moderator", - //Permissions = new[] {} }, new PermissionStereotype { Name = "Author", - Permissions = new[] {PublishBlogPost,EditBlogPost,DeleteBlogPost} + Permissions = new[] {PublishOwnBlogPost,EditOwnBlogPost,DeleteOwnBlogPost} }, new PermissionStereotype { Name = "Contributor", - Permissions = new[] {EditBlogPost} + Permissions = new[] {EditOwnBlogPost} }, }; } diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Services/XmlRpcHandler.cs b/src/Orchard.Web/Modules/Orchard.Blogs/Services/XmlRpcHandler.cs index f9972c7b9..bd48b5c8a 100644 --- a/src/Orchard.Web/Modules/Orchard.Blogs/Services/XmlRpcHandler.cs +++ b/src/Orchard.Web/Modules/Orchard.Blogs/Services/XmlRpcHandler.cs @@ -166,7 +166,7 @@ namespace Orchard.Blogs.Services { IEnumerable drivers) { var user = _membershipService.ValidateUser(userName, password); - _authorizationService.CheckAccess(Permissions.EditBlogPost, user, null); + _authorizationService.CheckAccess(Permissions.EditOwnBlogPost, user, null); var blog = _contentManager.Get(Convert.ToInt32(blogId)); if (blog == null) diff --git a/src/Orchard.Web/Modules/Orchard.Localization/Views/Parts/Localization.ContentTranslations.Summary.cshtml b/src/Orchard.Web/Modules/Orchard.Localization/Views/Parts/Localization.ContentTranslations.Summary.cshtml index e11e22c17..2b6cb48f0 100644 --- a/src/Orchard.Web/Modules/Orchard.Localization/Views/Parts/Localization.ContentTranslations.Summary.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Localization/Views/Parts/Localization.ContentTranslations.Summary.cshtml @@ -1,6 +1,6 @@ @using Orchard.Core.Contents; @using Orchard.Localization.Models; -@if (AuthorizedFor(Permissions.PublishContent)) { +@if (AuthorizedFor(Permissions.PublishOthersContent)) { Style.Require("LocalizationAdmin"); IEnumerable localizations = Model.Localizations; var localizationLinks = Html.UnorderedList(localizations, (c, i) => Html.ItemEditLink(c.Culture.Culture, c), "localizations"); diff --git a/src/Orchard.Web/Modules/Orchard.Localization/Views/Parts/Localization.ContentTranslations.SummaryAdmin.cshtml b/src/Orchard.Web/Modules/Orchard.Localization/Views/Parts/Localization.ContentTranslations.SummaryAdmin.cshtml index ed47211d7..c5e2fd5f2 100644 --- a/src/Orchard.Web/Modules/Orchard.Localization/Views/Parts/Localization.ContentTranslations.SummaryAdmin.cshtml +++ b/src/Orchard.Web/Modules/Orchard.Localization/Views/Parts/Localization.ContentTranslations.SummaryAdmin.cshtml @@ -1,6 +1,6 @@ @using Orchard.Core.Contents; @using Orchard.Localization.Models; -@if (AuthorizedFor(Permissions.PublishContent)) { +@if (AuthorizedFor(Permissions.PublishOthersContent)) { Style.Require("LocalizationAdmin"); IEnumerable localizations = Model.Localizations; var localizationLinks = Html.UnorderedList(localizations, (c, i) => Html.ItemEditLink(c.Culture.Culture, c), "localizations");