diff --git a/components/org.wso2.carbon.identity.organization.config.service/pom.xml b/components/org.wso2.carbon.identity.organization.config.service/pom.xml
index a20542c76..b6a558b1c 100644
--- a/components/org.wso2.carbon.identity.organization.config.service/pom.xml
+++ b/components/org.wso2.carbon.identity.organization.config.service/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.identity.organization.management
identity-organization-management
- 1.3.131
+ 1.3.134-SNAPSHOT
../../pom.xml
diff --git a/components/org.wso2.carbon.identity.organization.discovery.service/pom.xml b/components/org.wso2.carbon.identity.organization.discovery.service/pom.xml
index 2baa24c4b..91cd98916 100644
--- a/components/org.wso2.carbon.identity.organization.discovery.service/pom.xml
+++ b/components/org.wso2.carbon.identity.organization.discovery.service/pom.xml
@@ -20,7 +20,7 @@
org.wso2.carbon.identity.organization.management
identity-organization-management
- 1.3.131
+ 1.3.134-SNAPSHOT
../../pom.xml
diff --git a/components/org.wso2.carbon.identity.organization.management.application/pom.xml b/components/org.wso2.carbon.identity.organization.management.application/pom.xml
index ceb087ed4..e5126d693 100644
--- a/components/org.wso2.carbon.identity.organization.management.application/pom.xml
+++ b/components/org.wso2.carbon.identity.organization.management.application/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.identity.organization.management
identity-organization-management
- 1.3.131
+ 1.3.134-SNAPSHOT
../../pom.xml
diff --git a/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/handler/OrgClaimMgtHandler.java b/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/handler/OrgClaimMgtHandler.java
index 0bb5aa634..a390836eb 100644
--- a/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/handler/OrgClaimMgtHandler.java
+++ b/components/org.wso2.carbon.identity.organization.management.application/src/main/java/org/wso2/carbon/identity/organization/management/application/handler/OrgClaimMgtHandler.java
@@ -123,6 +123,21 @@ private void handlePostShareApplication(Event event) throws IdentityEventExcepti
addClaimsToSubOrganization(parentOrgCustomLocalClaims, sharedOrganizationTenantDomain,
missingClaims, parentTenantDomain);
}
+ // Add the custom claim dialects to the organization.
+ List claimDialectURIListInOrg = getClaimMetadataManagementService()
+ .getClaimDialects(sharedOrganizationTenantDomain).stream().map(ClaimDialect::getClaimDialectURI)
+ .collect(Collectors.toList());
+ getClaimMetadataManagementService().getClaimDialects(parentTenantDomain).stream()
+ .filter(claimDialect -> !claimDialectURIListInOrg.contains(claimDialect.getClaimDialectURI()))
+ .forEach(claimDialect -> {
+ try {
+ getClaimMetadataManagementService()
+ .addClaimDialect(claimDialect, sharedOrganizationTenantDomain);
+ } catch (ClaimMetadataException e) {
+ LOG.error("Error while adding claim dialect " + claimDialect.getClaimDialectURI() +
+ " to organization " + sharedOrganizationTenantDomain, e);
+ }
+ });
} catch (OrganizationManagementException | ClaimMetadataException e) {
throw new IdentityEventException("An error occurred while adding the claims.", e);
}
diff --git a/components/org.wso2.carbon.identity.organization.management.authz.service/pom.xml b/components/org.wso2.carbon.identity.organization.management.authz.service/pom.xml
index 05d1a534f..2ca19f610 100644
--- a/components/org.wso2.carbon.identity.organization.management.authz.service/pom.xml
+++ b/components/org.wso2.carbon.identity.organization.management.authz.service/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.identity.organization.management
identity-organization-management
- 1.3.131
+ 1.3.134-SNAPSHOT
../../pom.xml
diff --git a/components/org.wso2.carbon.identity.organization.management.claim.provider/pom.xml b/components/org.wso2.carbon.identity.organization.management.claim.provider/pom.xml
index b20e19899..5bb5f1b51 100644
--- a/components/org.wso2.carbon.identity.organization.management.claim.provider/pom.xml
+++ b/components/org.wso2.carbon.identity.organization.management.claim.provider/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.identity.organization.management
identity-organization-management
- 1.3.131
+ 1.3.134-SNAPSHOT
../../pom.xml
diff --git a/components/org.wso2.carbon.identity.organization.management.ext/pom.xml b/components/org.wso2.carbon.identity.organization.management.ext/pom.xml
index b936f6f49..b1b27b95f 100644
--- a/components/org.wso2.carbon.identity.organization.management.ext/pom.xml
+++ b/components/org.wso2.carbon.identity.organization.management.ext/pom.xml
@@ -22,7 +22,7 @@
org.wso2.carbon.identity.organization.management
identity-organization-management
- 1.3.131
+ 1.3.134-SNAPSHOT
../../pom.xml
diff --git a/components/org.wso2.carbon.identity.organization.management.governance.connector/pom.xml b/components/org.wso2.carbon.identity.organization.management.governance.connector/pom.xml
index c8a6db43d..ad465e54e 100644
--- a/components/org.wso2.carbon.identity.organization.management.governance.connector/pom.xml
+++ b/components/org.wso2.carbon.identity.organization.management.governance.connector/pom.xml
@@ -21,7 +21,7 @@
org.wso2.carbon.identity.organization.management
identity-organization-management
- 1.3.131
+ 1.3.134-SNAPSHOT
../../pom.xml
4.0.0
diff --git a/components/org.wso2.carbon.identity.organization.management.handler/pom.xml b/components/org.wso2.carbon.identity.organization.management.handler/pom.xml
index cbe97a462..e5bbe42c7 100644
--- a/components/org.wso2.carbon.identity.organization.management.handler/pom.xml
+++ b/components/org.wso2.carbon.identity.organization.management.handler/pom.xml
@@ -21,7 +21,7 @@
identity-organization-management
org.wso2.carbon.identity.organization.management
- 1.3.131
+ 1.3.134-SNAPSHOT
../../pom.xml
4.0.0
diff --git a/components/org.wso2.carbon.identity.organization.management.handler/src/main/java/org/wso2/carbon/identity/organization/management/handler/listener/SharedRoleMgtListener.java b/components/org.wso2.carbon.identity.organization.management.handler/src/main/java/org/wso2/carbon/identity/organization/management/handler/listener/SharedRoleMgtListener.java
index 1fd9f2069..fd1611575 100644
--- a/components/org.wso2.carbon.identity.organization.management.handler/src/main/java/org/wso2/carbon/identity/organization/management/handler/listener/SharedRoleMgtListener.java
+++ b/components/org.wso2.carbon.identity.organization.management.handler/src/main/java/org/wso2/carbon/identity/organization/management/handler/listener/SharedRoleMgtListener.java
@@ -308,10 +308,15 @@ private void handleAddedOrganizationAudienceRolesOnAppUpdate(List addedO
CompletableFuture.runAsync(() -> {
String sharedAppOrgId = sharedApplication.getOrganizationId();
try {
+ String shareAppTenantDomain = organizationManager.resolveTenantDomain(sharedAppOrgId);
+ PrivilegedCarbonContext.startTenantFlow();
+ PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(shareAppTenantDomain, true);
createSharedRolesWithOrgAudience(addedOrgRolesList, tenantDomain, sharedAppOrgId);
} catch (IdentityRoleManagementException | OrganizationManagementException e) {
LOG.error(String.format("Exception occurred while adding shared roles to organization: %s",
sharedApplication.getOrganizationId()), e);
+ } finally {
+ PrivilegedCarbonContext.endTenantFlow();
}
}, executorService).exceptionally(throwable -> {
LOG.error(String.format("Exception occurred while adding shared roles to organization: %s",
diff --git a/components/org.wso2.carbon.identity.organization.management.organization.user.sharing/pom.xml b/components/org.wso2.carbon.identity.organization.management.organization.user.sharing/pom.xml
index 8d7e4fae3..237d45b4c 100644
--- a/components/org.wso2.carbon.identity.organization.management.organization.user.sharing/pom.xml
+++ b/components/org.wso2.carbon.identity.organization.management.organization.user.sharing/pom.xml
@@ -20,7 +20,7 @@
org.wso2.carbon.identity.organization.management
identity-organization-management
- 1.3.131
+ 1.3.134-SNAPSHOT
../../pom.xml
diff --git a/components/org.wso2.carbon.identity.organization.management.role.management.service/pom.xml b/components/org.wso2.carbon.identity.organization.management.role.management.service/pom.xml
index 5994a9f7d..97861abbd 100644
--- a/components/org.wso2.carbon.identity.organization.management.role.management.service/pom.xml
+++ b/components/org.wso2.carbon.identity.organization.management.role.management.service/pom.xml
@@ -4,7 +4,7 @@
identity-organization-management
org.wso2.carbon.identity.organization.management
- 1.3.131
+ 1.3.134-SNAPSHOT
../../pom.xml
diff --git a/components/org.wso2.carbon.identity.organization.management.tenant.association/pom.xml b/components/org.wso2.carbon.identity.organization.management.tenant.association/pom.xml
index de27212aa..2107172ca 100644
--- a/components/org.wso2.carbon.identity.organization.management.tenant.association/pom.xml
+++ b/components/org.wso2.carbon.identity.organization.management.tenant.association/pom.xml
@@ -21,7 +21,7 @@
identity-organization-management
org.wso2.carbon.identity.organization.management
- 1.3.131
+ 1.3.134-SNAPSHOT
../../pom.xml
4.0.0
diff --git a/components/org.wso2.carbon.identity.organization.management.tomcat.ext.tenant.resolver/pom.xml b/components/org.wso2.carbon.identity.organization.management.tomcat.ext.tenant.resolver/pom.xml
index ef5a1198e..534046b66 100644
--- a/components/org.wso2.carbon.identity.organization.management.tomcat.ext.tenant.resolver/pom.xml
+++ b/components/org.wso2.carbon.identity.organization.management.tomcat.ext.tenant.resolver/pom.xml
@@ -20,7 +20,7 @@
org.wso2.carbon.identity.organization.management
identity-organization-management
- 1.3.131
+ 1.3.134-SNAPSHOT
../../pom.xml
diff --git a/components/org.wso2.carbon.identity.organization.user.invitation.management/pom.xml b/components/org.wso2.carbon.identity.organization.user.invitation.management/pom.xml
index 5405f4df7..1121b8aeb 100644
--- a/components/org.wso2.carbon.identity.organization.user.invitation.management/pom.xml
+++ b/components/org.wso2.carbon.identity.organization.user.invitation.management/pom.xml
@@ -20,7 +20,7 @@
org.wso2.carbon.identity.organization.management
identity-organization-management
- 1.3.131
+ 1.3.134-SNAPSHOT
../../pom.xml
diff --git a/features/org.wso2.carbon.identity.organization.management.server.feature/pom.xml b/features/org.wso2.carbon.identity.organization.management.server.feature/pom.xml
index 7c7aa3b05..1c34c672d 100644
--- a/features/org.wso2.carbon.identity.organization.management.server.feature/pom.xml
+++ b/features/org.wso2.carbon.identity.organization.management.server.feature/pom.xml
@@ -19,7 +19,7 @@
org.wso2.carbon.identity.organization.management
identity-organization-management
- 1.3.131
+ 1.3.134-SNAPSHOT
../../pom.xml
diff --git a/pom.xml b/pom.xml
index c9a87ed41..efc37b13a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
org.wso2.carbon.identity.organization.management
identity-organization-management
- 1.3.131
+ 1.3.134-SNAPSHOT
4.0.0
pom
WSO2 Carbon - Organization Management
@@ -36,7 +36,7 @@
https://github.com/wso2-extensions/identity-organization-management.git
scm:git:https://github.com/wso2-extensions/identity-organization-management.git
scm:git:https://github.com/wso2-extensions/identity-organization-management.git
- v1.3.131
+ HEAD