diff --git a/src/Umbraco.Web.BackOffice/Trees/ContentTreeControllerBase.cs b/src/Umbraco.Web.BackOffice/Trees/ContentTreeControllerBase.cs index 84e7692d0c..930c51c713 100644 --- a/src/Umbraco.Web.BackOffice/Trees/ContentTreeControllerBase.cs +++ b/src/Umbraco.Web.BackOffice/Trees/ContentTreeControllerBase.cs @@ -384,8 +384,8 @@ public abstract class ContentTreeControllerBase : TreeController, ITreeNodeContr /// protected sealed override ActionResult GetTreeNodes(string id, FormCollection queryStrings) { - // check if we're rendering the root - if (id == Constants.System.RootString) + //check if we're rendering the root + if (id == Constants.System.RootString && UserStartNodes.Contains(Constants.System.Root)) { var altStartId = string.Empty; @@ -394,7 +394,7 @@ public abstract class ContentTreeControllerBase : TreeController, ITreeNodeContr altStartId = queryStrings.GetValue(TreeQueryStringParameters.StartNodeId); } - // check if a request has been made to render from a specific start node + //check if a request has been made to render from a specific start node if (string.IsNullOrEmpty(altStartId) == false && altStartId != "undefined" && altStartId != Constants.System.RootString) { @@ -402,17 +402,16 @@ public abstract class ContentTreeControllerBase : TreeController, ITreeNodeContr } ActionResult nodesResult = GetTreeNodesInternal(id, queryStrings); - - if (nodesResult.Result is not null) + if (!(nodesResult.Result is null)) { return nodesResult.Result; } TreeNodeCollection? nodes = nodesResult.Value; - // only render the recycle bin if we are not in dialog and the start id is still the root - // we need to check for the "application" key in the queryString because its value is required here, - // and for some reason when there are no dashboards, this parameter is missing + //only render the recycle bin if we are not in dialog and the start id is still the root + //we need to check for the "application" key in the queryString because its value is required here, + //and for some reason when there are no dashboards, this parameter is missing if (IsDialog(queryStrings) == false && id == Constants.System.RootString && queryStrings.HasKey("application")) {