Removed code that populates content tree with duplicate start nodes.
This commit is contained in:
committed by
Sebastiaan Janssen
parent
eeaf17c857
commit
15eb40aedb
@@ -189,8 +189,7 @@ namespace Umbraco.Web.Trees
|
||||
{
|
||||
// try to parse id as an integer else use GetEntityFromId
|
||||
// which will grok Guids, Udis, etc and let use obtain the id
|
||||
int entityId;
|
||||
if (int.TryParse(id, out entityId) == false)
|
||||
if (int.TryParse(id, out var entityId) == false)
|
||||
{
|
||||
var entity = GetEntityFromId(id);
|
||||
if (entity == null)
|
||||
@@ -198,15 +197,6 @@ namespace Umbraco.Web.Trees
|
||||
entityId = entity.Id;
|
||||
}
|
||||
|
||||
// if a request is made for the root node but user has no access to
|
||||
// root node, return start nodes instead
|
||||
if (entityId == Constants.System.Root && UserStartNodes.Contains(Constants.System.Root) == false)
|
||||
{
|
||||
return UserStartNodes.Length > 0
|
||||
? Services.EntityService.GetAll(UmbracoObjectType, UserStartNodes)
|
||||
: Enumerable.Empty<IUmbracoEntity>();
|
||||
}
|
||||
|
||||
return Services.EntityService.GetChildren(entityId, UmbracoObjectType).ToArray();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user