Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ganization-management into multi_user_cretion
  • Loading branch information
Kanapriya committed Dec 8, 2023
2 parents 4dd8a1b + d680346 commit 497733e
Show file tree
Hide file tree
Showing 17 changed files with 36 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.identity.organization.management</groupId>
<artifactId>identity-organization-management</artifactId>
<version>1.3.131</version>
<version>1.3.134-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.wso2.carbon.identity.organization.management</groupId>
<artifactId>identity-organization-management</artifactId>
<version>1.3.131</version>
<version>1.3.134-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.identity.organization.management</groupId>
<artifactId>identity-organization-management</artifactId>
<version>1.3.131</version>
<version>1.3.134-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> 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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.identity.organization.management</groupId>
<artifactId>identity-organization-management</artifactId>
<version>1.3.131</version>
<version>1.3.134-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.identity.organization.management</groupId>
<artifactId>identity-organization-management</artifactId>
<version>1.3.131</version>
<version>1.3.134-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.identity.organization.management</groupId>
<artifactId>identity-organization-management</artifactId>
<version>1.3.131</version>
<version>1.3.134-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.wso2.carbon.identity.organization.management</groupId>
<artifactId>identity-organization-management</artifactId>
<version>1.3.131</version>
<version>1.3.134-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>identity-organization-management</artifactId>
<groupId>org.wso2.carbon.identity.organization.management</groupId>
<version>1.3.131</version>
<version>1.3.134-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,15 @@ private void handleAddedOrganizationAudienceRolesOnAppUpdate(List<RoleV2> 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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.wso2.carbon.identity.organization.management</groupId>
<artifactId>identity-organization-management</artifactId>
<version>1.3.131</version>
<version>1.3.134-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>identity-organization-management</artifactId>
<groupId>org.wso2.carbon.identity.organization.management</groupId>
<version>1.3.131</version>
<version>1.3.134-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<artifactId>identity-organization-management</artifactId>
<groupId>org.wso2.carbon.identity.organization.management</groupId>
<version>1.3.131</version>
<version>1.3.134-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.wso2.carbon.identity.organization.management</groupId>
<artifactId>identity-organization-management</artifactId>
<version>1.3.131</version>
<version>1.3.134-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.wso2.carbon.identity.organization.management</groupId>
<artifactId>identity-organization-management</artifactId>
<version>1.3.131</version>
<version>1.3.134-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>org.wso2.carbon.identity.organization.management</groupId>
<artifactId>identity-organization-management</artifactId>
<version>1.3.131</version>
<version>1.3.134-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<groupId>org.wso2.carbon.identity.organization.management</groupId>
<artifactId>identity-organization-management</artifactId>
<version>1.3.131</version>
<version>1.3.134-SNAPSHOT</version>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<name>WSO2 Carbon - Organization Management</name>
Expand All @@ -36,7 +36,7 @@
<url>https://github.com/wso2-extensions/identity-organization-management.git</url>
<developerConnection>scm:git:https://github.com/wso2-extensions/identity-organization-management.git</developerConnection>
<connection>scm:git:https://github.com/wso2-extensions/identity-organization-management.git</connection>
<tag>v1.3.131</tag>
<tag>HEAD</tag>
</scm>

<modules>
Expand Down

0 comments on commit 497733e

Please sign in to comment.