Merge branch 'v8/dev' of https://github.com/umbraco/Umbraco-CMS into v8/dev
This commit is contained in:
@@ -174,7 +174,12 @@ namespace Umbraco.Web.PropertyEditors
|
||||
// more magic here ;-(
|
||||
var configuration = dataTypeService.GetDataType(propertyType.DataTypeId).ConfigurationAs<ImageCropperConfiguration>();
|
||||
var crops = configuration?.Crops ?? Array.Empty<ImageCropperConfiguration.Crop>();
|
||||
return "{src: '" + val + "', crops: " + crops + "}";
|
||||
|
||||
return JsonConvert.SerializeObject(new
|
||||
{
|
||||
src = val,
|
||||
crops = crops
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -410,18 +410,7 @@ namespace Umbraco.Web.Trees
|
||||
internal IEnumerable<MenuItem> GetAllowedUserMenuItemsForNode(IUmbracoEntity dd)
|
||||
{
|
||||
var permission = Services.UserService.GetPermissions(Security.CurrentUser, dd.Path);
|
||||
// TODO: inject
|
||||
var actions = Current.Actions.FromEntityPermission(permission)
|
||||
.ToList();
|
||||
|
||||
var actionDelete = Current.Actions.GetAction<ActionDelete>();
|
||||
|
||||
// A user is allowed to delete their own stuff
|
||||
var tryGetCurrentUserId = Security.GetUserId();
|
||||
if (tryGetCurrentUserId && dd.CreatorId == tryGetCurrentUserId.Result && actions.Contains(actionDelete) == false)
|
||||
actions.Add(actionDelete);
|
||||
|
||||
return actions.Select(x => new MenuItem(x));
|
||||
return Current.Actions.FromEntityPermission(permission).Select(x => new MenuItem(x));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user