You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the new multi-tenant Role types (see this explanation about multi-tenant Role types in the docs) in version 2.0.0 are two issues that haven't been covered in the current release (2.1.0). They are
1. Changing the RoleType can cause problems
The issues are
If a Normal Role is changed to a HiddenFromTenant then that Role should be removed from any tenant users.
If a Normal or HiddenFromTenant Role's RoleType are changed to TenantAutoAdd or TenantAdminAdd then the roles are in the correct place (i.e. should be in the TenantRoles)
If a TenantAutoAdd or TenantAdminAdd Role's RoleType are changed to Normal or HiddenFromTenant then the roles are in the correct place (i.e. should be in the AuthUser's Roles)
I could just detect these changes and sent back an error, but issue 1 (Normal Role is changed to a HiddenFromTenant) would be fairly easy to delete that Role from Tenant users using the Role Delete checks.
Delete Role
The DeleteRoleAsync method works on tenant Roles because it deletes the RoleToPermissions which remove the user or tenant link. The only problem is that the QueryUsersUsingThisRole method only covers AuthUsers. We need a QueryTenantsUsingThisRole too.
The text was updated successfully, but these errors were encountered:
JonPSmith
changed the title
Roles:
Multi-tenant Roles: Problem when changing a Roles RoleType or when deleting
Jan 3, 2022
With the new multi-tenant Role types (see this explanation about multi-tenant Role types in the docs) in version 2.0.0 are two issues that haven't been covered in the current release (2.1.0). They are
1. Changing the
RoleType
can cause problemsThe issues are
Normal
Role is changed to aHiddenFromTenant
then that Role should be removed from any tenant users.Normal
orHiddenFromTenant
Role'sRoleType
are changed toTenantAutoAdd
orTenantAdminAdd
then the roles are in the correct place (i.e. should be in the TenantRoles)TenantAutoAdd
orTenantAdminAdd
Role'sRoleType
are changed toNormal
orHiddenFromTenant
then the roles are in the correct place (i.e. should be in the AuthUser's Roles)I could just detect these changes and sent back an error, but issue 1 (
Normal
Role is changed to aHiddenFromTenant
) would be fairly easy to delete that Role from Tenant users using the Role Delete checks.Delete Role
The
DeleteRoleAsync
method works on tenant Roles because it deletes the RoleToPermissions which remove the user or tenant link. The only problem is that theQueryUsersUsingThisRole
method only covers AuthUsers. We need aQueryTenantsUsingThisRole
too.The text was updated successfully, but these errors were encountered: