Fixes Search an element from its GUID with the backoffice #6185 (#6530)

This commit is contained in:
Shannon Deminick
2019-10-15 00:07:44 +11:00
committed by Sebastiaan Janssen
parent fa7a46389c
commit 63ae00b0f3
8 changed files with 122 additions and 31 deletions

View File

@@ -15,6 +15,10 @@ using Umbraco.Web.WebApi.Filters;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Search;
using Constants = Umbraco.Core.Constants;
using Umbraco.Core.Cache;
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Core.Persistence;
namespace Umbraco.Web.Trees
{
@@ -36,20 +40,21 @@ namespace Umbraco.Web.Trees
private readonly UmbracoTreeSearcher _treeSearcher;
private readonly ActionCollection _actions;
public ContentTreeController(UmbracoTreeSearcher treeSearcher, ActionCollection actions)
{
_treeSearcher = treeSearcher;
_actions = actions;
}
protected override int RecycleBinId => Constants.System.RecycleBinContent;
protected override bool RecycleBinSmells => Services.ContentService.RecycleBinSmells();
private int[] _userStartNodes;
protected override int[] UserStartNodes
=> _userStartNodes ?? (_userStartNodes = Security.CurrentUser.CalculateContentStartNodeIds(Services.EntityService));
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)
{
_treeSearcher = treeSearcher;
_actions = actions;
}
/// <inheritdoc />
protected override TreeNode GetSingleTreeNode(IEntitySlim entity, string parentId, FormDataCollection queryStrings)
{