Base solution for your next web application
Open Closed

Navigation Menu based on roles not permissions #1736


User avatar
0
bbakermmc created

Is there an example that shows the nav menu using roles instead of permissions or where I would start to extend it so it can use roles instead of permissions.


1 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    No way of doing this now. But if you assign a permission to a menu item and grant a role for this permission, the thing you want will work. I don't suggest to define hard-coded role names.

    BTW, this is where we check the permission: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp/Application/Navigation/UserNavigationManager.cs#L90">https://github.com/aspnetboilerplate/as ... ger.cs#L90</a>