Skip to content

Commit

Permalink
Remove domain addition
Browse files Browse the repository at this point in the history
  • Loading branch information
SujanSanjula96 committed Oct 29, 2023
1 parent 8cddd33 commit 34bf525
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -860,12 +860,9 @@ public static void updateEveryOneRoleV2MetaData(int tenantId) {
try {
UserStoreManager userStoreManager = (UserStoreManager) SCIMCommonComponentHolder.getRealmService().
getTenantUserRealm(tenantId).getUserStoreManager();
String domainName = UserCoreUtil.getDomainName(userStoreManager.getRealmConfiguration());
SCIMGroupHandler scimGroupHandler = new SCIMGroupHandler(userStoreManager.getTenantId());
String everyoneRoleName = userStoreManager.getRealmConfiguration().getEveryOneRoleName();
String everyoneRoleNameWithDomain =
UserCoreUtil.addDomainToName(everyoneRoleName, domainName);
scimGroupHandler.addRoleV2MandatoryAttributes(everyoneRoleNameWithDomain);
scimGroupHandler.addRoleV2MandatoryAttributes(everyoneRoleName);
} catch (org.wso2.carbon.user.api.UserStoreException | IdentitySCIMException e) {
log.error(e);
}
Expand All @@ -884,11 +881,8 @@ public static void updateSystemRoleV2MetaData(int tenantId) {
try {
UserStoreManager userStoreManager = (UserStoreManager) SCIMCommonComponentHolder.getRealmService().
getTenantUserRealm(tenantId).getUserStoreManager();
String domainName = UserCoreUtil.getDomainName(userStoreManager.getRealmConfiguration());
SCIMGroupHandler scimGroupHandler = new SCIMGroupHandler(userStoreManager.getTenantId());
String systemRoleNameWithDomain =
UserCoreUtil.addDomainToName(AccountConstants.ACCOUNT_LOCK_BYPASS_ROLE, domainName);
scimGroupHandler.addRoleV2MandatoryAttributes(systemRoleNameWithDomain);
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 34bf525

Please sign in to comment.