Base solution for your next web application
Open Closed

How to assign view role to Navigation Menu and Pages #8540


User avatar
0
optixdev created

Angular + .Net Core

How to display spectific menu and pages to these roles:

HOST Admin: new AppMenuItem('Dashboard', 'Pages.Administration.Host.Dashboard', 'flaticon-line-graph', '/app/admin/hostDashboard'),

Tenant Admin: new AppMenuItem('Dashboard', 'Pages.Tenant.Dashboard', 'flaticon-line-graph', '/app/main/dashboard'),

Tenant User: ? with tenant admin code the menu is not apppering on the User side.


5 Answer(s)
  • User Avatar
    -1
    ismcagdas created
    Support Team

    Hi @optixdev

    You can select permissions of a role on Role List by clicking the Edit button.

  • User Avatar
    0
    optixdev created

    @ismcagdas I don't want to make user as tenant admin.

    I have three Pages A, B and C thats display in Navigation Menu

    (Angular + .Net Core)

    I have to show:

    Page A to Tenant Admin and Tenant User

    Page B to Tenant User only

    Page C to Tenant Admin only

    [Note: These pages are STATIC 'Page A' and created only in Angular Projects as they dont need entity/database connection. Also it should not display on Host Admin/User]

    How can I do this?

  • User Avatar
    -1
    ismcagdas created
    Support Team

    Hi @optixdev

    You first need to define Permisison for each page. for example, Pages.PageA, Pages.PageB, Pages.PageC. Then, you can assign those permisisons to any role you want either User or Permisison role under a tenant. So, there is no static way of defining this.

  • User Avatar
    0
    optixdev created

    Hi @ismcagdas

    How and where I can define Permisison for each page? Also, whats new in version 8.3? What is the best way to merge 8.2 with 8.3?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You can define Permissions in AppAuthorizationProvider.cs and use those in app-navigation.service.ts.