Fixes issue with broken caches used for user permissions
Calculating start nodes is expensive and this is supposed to be cached but the cache was not working.
This commit is contained in:
@@ -47,7 +47,7 @@ namespace Umbraco.Web.Trees
|
||||
private int[] _userStartNodes;
|
||||
|
||||
protected override int[] UserStartNodes
|
||||
=> _userStartNodes ?? (_userStartNodes = Security.CurrentUser.CalculateContentStartNodeIds(Services.EntityService));
|
||||
=> _userStartNodes ?? (_userStartNodes = Security.CurrentUser.CalculateContentStartNodeIds(Services.EntityService, AppCaches));
|
||||
|
||||
public ContentTreeController(UmbracoTreeSearcher treeSearcher, ActionCollection actions, IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoHelper umbracoHelper) : base(globalSettings, umbracoContextAccessor, sqlContext, services, appCaches, logger, runtimeState, umbracoHelper)
|
||||
{
|
||||
@@ -165,7 +165,7 @@ namespace Umbraco.Web.Trees
|
||||
}
|
||||
|
||||
//if the user has no path access for this node, all they can do is refresh
|
||||
if (!Security.CurrentUser.HasContentPathAccess(item, Services.EntityService))
|
||||
if (!Security.CurrentUser.HasContentPathAccess(item, Services.EntityService, AppCaches))
|
||||
{
|
||||
var menu = new MenuItemCollection();
|
||||
menu.Items.Add(new RefreshNode(Services.TextService, true));
|
||||
|
||||
Reference in New Issue
Block a user