diff --git a/components/org.wso2.carbon.identity.organization.management.handler/src/main/java/org/wso2/carbon/identity/organization/management/handler/SharedRoleMgtHandler.java b/components/org.wso2.carbon.identity.organization.management.handler/src/main/java/org/wso2/carbon/identity/organization/management/handler/SharedRoleMgtHandler.java index 9b003f051..49a4627d3 100644 --- a/components/org.wso2.carbon.identity.organization.management.handler/src/main/java/org/wso2/carbon/identity/organization/management/handler/SharedRoleMgtHandler.java +++ b/components/org.wso2.carbon.identity.organization.management.handler/src/main/java/org/wso2/carbon/identity/organization/management/handler/SharedRoleMgtHandler.java @@ -35,11 +35,11 @@ import org.wso2.carbon.identity.organization.management.service.model.BasicOrganization; import org.wso2.carbon.identity.organization.management.service.model.Organization; import org.wso2.carbon.identity.organization.management.service.model.ParentOrganizationDO; +import org.wso2.carbon.identity.organization.management.service.util.Utils; import org.wso2.carbon.identity.role.v2.mgt.core.IdentityRoleManagementException; import org.wso2.carbon.identity.role.v2.mgt.core.RoleBasicInfo; import org.wso2.carbon.identity.role.v2.mgt.core.RoleConstants; import org.wso2.carbon.identity.role.v2.mgt.core.RoleManagementService; -import org.wso2.carbon.utils.multitenancy.MultitenantConstants; import java.util.Collections; import java.util.List; @@ -124,8 +124,7 @@ private void createSubOrgRolesOnNewRoleCreation(Map eventPropert String roleAudienceType = (String) eventProperties.get(IdentityEventConstants.EventProperty.AUDIENCE); String roleAudienceId = (String) eventProperties.get(IdentityEventConstants.EventProperty.AUDIENCE_ID); String roleOrgId = getOrganizationManager().resolveOrganizationId(roleTenantDomain); - boolean isPrimaryOrganization = getOrganizationManager().isPrimaryOrganization(roleOrgId); - if (!isPrimaryOrganization && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(roleTenantDomain)) { + if (Utils.isOrganization(roleTenantDomain)) { return; } switch (roleAudienceType) { diff --git a/pom.xml b/pom.xml index 600fb1781..153dc4269 100644 --- a/pom.xml +++ b/pom.xml @@ -495,7 +495,7 @@ [1.0.0,2.0.0) - 1.0.67 + 1.0.69 [1.0.0,2.0.0) @@ -503,7 +503,7 @@ [4.7.0,5.0.0) - 5.25.396 + 5.25.374 [5.20.0, 7.0.0)