Use all assigned groups and explicit permission assignments when calculating available actions for a given node

This commit is contained in:
Kenn Jacobsen
2019-10-11 15:07:32 +02:00
parent ec6b38175c
commit f6e7740c93
5 changed files with 18 additions and 16 deletions

View File

@@ -124,8 +124,8 @@ namespace Umbraco.Web.Trees
menu.DefaultMenuAlias = ActionNew.ActionAlias;
// we need to get the default permissions as you can't set permissions on the very root node
var permission = Services.UserService.GetPermissions(Security.CurrentUser, Constants.System.Root).First();
var nodeActions = _actions.FromEntityPermission(permission)
var assignedPermissions = Services.UserService.GetAssignedPermissions(Security.CurrentUser, Constants.System.Root);
var nodeActions = _actions.GetByLetters(assignedPermissions)
.Select(x => new MenuItem(x));
//these two are the standard items