Remove the default action from tree menus if it isn't allowed
This commit is contained in:
committed by
Sebastiaan Janssen
parent
57fa452c49
commit
269f12edbf
@@ -375,6 +375,11 @@ namespace Umbraco.Web.Trees
|
||||
foreach (var m in notAllowed)
|
||||
{
|
||||
menuWithAllItems.Items.Remove(m);
|
||||
// if the disallowed action is set as default action, make sure to reset the default action as well
|
||||
if (menuWithAllItems.DefaultMenuAlias == m.Alias)
|
||||
{
|
||||
menuWithAllItems.DefaultMenuAlias = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user