Updated DB and business logic to support multiple starts nodes for a user and for user groups to have start nodes - U4-9915 User Groups will have a start node assigned and Users can have multiple start nodes assigned

This commit is contained in:
Shannon
2017-05-25 02:03:41 +10:00
parent 38837049f0
commit dec9422531
70 changed files with 774 additions and 421 deletions

View File

@@ -42,7 +42,7 @@ namespace Umbraco.Web.Trees
{
var node = base.CreateRootNode(queryStrings);
//if the user's start node is not default, then ensure the root doesn't have a menu
if (Security.CurrentUser.StartContentId != Constants.System.Root)
if (Security.CurrentUser.StartContentIds.Length > 0 && Security.CurrentUser.StartContentIds.Contains(Constants.System.Root) == false)
{
node.MenuUrl = "";
}
@@ -60,9 +60,9 @@ namespace Umbraco.Web.Trees
get { return Services.ContentService.RecycleBinSmells(); }
}
protected override int UserStartNode
protected override int[] UserStartNodes
{
get { return Security.CurrentUser.StartContentId; }
get { return Security.CurrentUser.StartContentIds; }
}
/// <summary>
@@ -121,7 +121,7 @@ namespace Umbraco.Web.Trees
var menu = new MenuItemCollection();
//if the user's start node is not the root then ensure the root menu is empty/doesn't exist
if (Security.CurrentUser.StartContentId != Constants.System.Root)
if (Security.CurrentUser.StartContentIds.Length > 0 && Security.CurrentUser.StartContentIds.Contains(Constants.System.Root) == false)
{
return menu;
}