User and User type from the old businesslogic assembly are GONE!

This commit is contained in:
Shannon
2016-03-16 17:52:08 +01:00
parent f594a1132d
commit 9ac2d04aea
85 changed files with 367 additions and 1613 deletions

View File

@@ -267,10 +267,11 @@ namespace Umbraco.Web.Trees
internal IEnumerable<MenuItem> GetAllowedUserMenuItemsForNode(IUmbracoEntity dd)
{
var actions = global::Umbraco.Web.LegacyActions.Action.FromString(UmbracoUser.GetPermissions(dd.Path));
var permission = Services.UserService.GetPermissions(Security.CurrentUser, dd.Path);
var actions = global::Umbraco.Web.LegacyActions.Action.FromEntityPermission(permission);
// A user is allowed to delete their own stuff
if (dd.CreatorId == UmbracoUser.Id && actions.Contains(ActionDelete.Instance) == false)
if (dd.CreatorId == Security.CurrentUser.Id && actions.Contains(ActionDelete.Instance) == false)
actions.Add(ActionDelete.Instance);
return actions.Select(x => new MenuItem(x));