Editors should always be allowed to delete their own content (#6799)
* Users should always be allowed to delete their own content * Changed comment to be more precise
This commit is contained in:
committed by
Elitsa Marinovska
parent
96a2af2653
commit
8a02b4f587
@@ -28,6 +28,7 @@ using Constants = Umbraco.Core.Constants;
|
||||
using umbraco.cms.businesslogic;
|
||||
using System.Collections;
|
||||
using umbraco;
|
||||
using umbraco.BusinessLogic.Actions;
|
||||
|
||||
namespace Umbraco.Web.Editors
|
||||
{
|
||||
@@ -1171,6 +1172,12 @@ namespace Umbraco.Web.Editors
|
||||
var path = contentItem != null ? contentItem.Path : nodeId.ToString();
|
||||
var permission = userService.GetPermissionsForPath(user, path);
|
||||
|
||||
// users are allowed to delete their own content - see ContentTreeControllerBase.GetAllowedUserMenuItemsForNode()
|
||||
if(contentItem != null && contentItem.CreatorId == user.Id)
|
||||
{
|
||||
permission.PermissionsSet.Add(new EntityPermission(0, contentItem.Id, new [] { ActionDelete.Instance.Letter.ToString() } ));
|
||||
}
|
||||
|
||||
var allowed = true;
|
||||
foreach (var p in permissionsToCheck)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user