mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
user store role mapping feature
This commit is contained in:
parent
53c48d87ca
commit
3d159c0111
@ -75,6 +75,7 @@ public class UserStoreRoleMapper implements ServerStartupObserver {
|
|||||||
.getTenantUserRealm(MultitenantConstants.SUPER_TENANT_ID).getUserStoreManager();
|
.getTenantUserRealm(MultitenantConstants.SUPER_TENANT_ID).getUserStoreManager();
|
||||||
|
|
||||||
for (RoleMapping mapping : roleMappings) {
|
for (RoleMapping mapping : roleMappings) {
|
||||||
|
if (userStoreManager.isExistingRole(mapping.getSecondaryRole())) {
|
||||||
String[] users = userStoreManager.getUserListOfRole(mapping.getSecondaryRole());
|
String[] users = userStoreManager.getUserListOfRole(mapping.getSecondaryRole());
|
||||||
if (users != null && users.length > 0) {
|
if (users != null && users.length > 0) {
|
||||||
List<String> primaryRoles = mapping.getInternalRoles();
|
List<String> primaryRoles = mapping.getInternalRoles();
|
||||||
@ -113,6 +114,7 @@ public class UserStoreRoleMapper implements ServerStartupObserver {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Error while getting user store...", e);
|
log.error("Error while getting user store...", e);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user