From 34bf52581a534f4db70e211520e69d6e13a58550 Mon Sep 17 00:00:00 2001 From: SujanSanjula96 Date: Mon, 30 Oct 2023 00:08:47 +0530 Subject: [PATCH] Remove domain addition --- .../identity/scim2/common/utils/SCIMCommonUtils.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/utils/SCIMCommonUtils.java b/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/utils/SCIMCommonUtils.java index cd5d40887..d1b326ace 100644 --- a/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/utils/SCIMCommonUtils.java +++ b/components/org.wso2.carbon.identity.scim2.common/src/main/java/org/wso2/carbon/identity/scim2/common/utils/SCIMCommonUtils.java @@ -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); } @@ -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); }