user store role mapping feature

admin-role-isssue
Amalka Subasinghe 1 year ago
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…
Cancel
Save