Remove the default action from tree menus if it isn't allowed

This commit is contained in:
Kenn Jacobsen
2018-11-14 22:17:38 +01:00
committed by Sebastiaan Janssen
parent 57fa452c49
commit 269f12edbf

View File

@@ -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;
}
}
}