Skip to content

Commit

Permalink
Merge pull request #502 from AnuradhaSK/fix-restart-error
Browse files Browse the repository at this point in the history
Fix error log on pack restart
  • Loading branch information
AnuradhaSK committed Nov 2, 2023
2 parents fa14faf + 069f07a commit c083f8f
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,9 @@ public static void updateEveryOneRoleV2MetaData(int tenantId) {
getTenantUserRealm(tenantId).getUserStoreManager();
SCIMGroupHandler scimGroupHandler = new SCIMGroupHandler(userStoreManager.getTenantId());
String everyoneRoleName = userStoreManager.getRealmConfiguration().getEveryOneRoleName();
scimGroupHandler.addRoleV2MandatoryAttributes(everyoneRoleName);
if (!scimGroupHandler.isGroupExisting(everyoneRoleName)) {
scimGroupHandler.addRoleV2MandatoryAttributes(everyoneRoleName);
}
} catch (org.wso2.carbon.user.api.UserStoreException | IdentitySCIMException e) {
log.error(e);
}
Expand All @@ -882,7 +884,9 @@ public static void updateSystemRoleV2MetaData(int tenantId) {
UserStoreManager userStoreManager = (UserStoreManager) SCIMCommonComponentHolder.getRealmService().
getTenantUserRealm(tenantId).getUserStoreManager();
SCIMGroupHandler scimGroupHandler = new SCIMGroupHandler(userStoreManager.getTenantId());
scimGroupHandler.addRoleV2MandatoryAttributes(AccountConstants.ACCOUNT_LOCK_BYPASS_ROLE);
if (!scimGroupHandler.isGroupExisting(AccountConstants.ACCOUNT_LOCK_BYPASS_ROLE)) {
scimGroupHandler.addRoleV2MandatoryAttributes(AccountConstants.ACCOUNT_LOCK_BYPASS_ROLE);
}
} catch (org.wso2.carbon.user.api.UserStoreException | IdentitySCIMException e) {
log.error(e);
}
Expand Down

0 comments on commit c083f8f

Please sign in to comment.