Custom navigation with AD membership

Issue #1 new
3ijtKwijt created an issue

I found out that using the Active Directory Providers package, when making a navigation to show only menu items that you have access to, it breaks...

My code:

@foreach (var node in homePage.Children.Where("UmbracoNaviHide == false"))
{
    if (!Umbraco.MemberHasAccess(node.Path))
    {
        continue;
    }
    //member has access, generate menu here
<li class="@(CurrentPage.Id == node.Id ? "current_page_item" : null)"><a href="@node.Url">@node.Name</a></li>
}

Works fine without the Active Directory Providers but with it, it doesn't, as I need this, I am also in need for a solution, but haven't been able yet to find one.

Comments (0)

  1. Log in to comment