Hi, I want to create tenant specific menu (Left side Menu). I am using edit "Roles" feature to add/remove menu items, this is working fine for normal users under any Tenancy but admin of every Tenancy is still able to view all menu items.
My Requirement:
- Host have different menu.
- Tenant admin/normal users have different mentu.
5 Answer(s)
-
0
Hi @smartlayer
You can create different Roles for Tenant users and admin and assign necessary permissions to those Roles. Also, you can assign specific permissions to each user if necessary.
Does that work for you ?
-
0
Issue is when we create a new tenant a default user is also created whose role is admin. So Whatever permissions we have applied to host(admin) role are automatically applied to tenant user (admin role). That's why same menu is appearing for Host admin and Tenant admin. Is there any way we can create a new role let's say "TenantAdmin" and whenever we create a new tenant role "TenantAdmin" is applied to default user?
-
0
Hi @ismcagdas,
I have achived this using "StaticRoles" feature:
roleManagementConfig.StaticRoles.Add( new StaticRoleDefinition( StaticRoleNames.Tenants.Tenant_Admin, MultiTenancySides.Tenant) { GrantedPermissions = { AppPermissions.Pages_Administration, AppPermissions.Pages_Administration_Roles, AppPermissions.Pages_Administration_Roles_Edit } } );
My question is this will apply permissions to newly created Tenant, But how we will add/Remove permissions to all existing tenants? Is there any feature available?
I have found something regarding this: https://github.com/aspnetboilerplate/aspnetboilerplate/issues/4528#issuecomment-510102409 is this ok?
Or can you guide me how to achieve this.
-
0
Hi @smartlayer
You are right, existing tenants will not be updated. You need to update existing tenants manually.