Skip to content

Commit

Permalink
Merge pull request #4824 from DilshanSenarath/dilshan
Browse files Browse the repository at this point in the history
fix scim2 group & role issue
  • Loading branch information
Kanapriya authored Aug 3, 2023
2 parents b3c3430 + a15fe68 commit 80a1a5d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.event</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.inbound.provisioning.scim2</groupId>
<artifactId>org.wso2.carbon.identity.scim2.common</artifactId>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -133,7 +137,8 @@
org.wso2.carbon.database.utils.*;version="${org.wso2.carbon.database.utils.version.range}",
org.wso2.carbon.identity.core.util;version="${carbon.identity.package.import.version.range}",
org.wso2.carbon.identity.event.*; version="${carbon.identity.package.import.version.range}",
org.wso2.carbon.identity.central.log.mgt.utils;version="${carbon.identity.package.import.version.range}"
org.wso2.carbon.identity.central.log.mgt.utils;version="${carbon.identity.package.import.version.range}",
org.wso2.carbon.identity.scim2.common.utils; version="${org.wso2.carbon.identity.scim2.common.version}"
</Import-Package>
<Export-Package>
!org.wso2.carbon.identity.role.mgt.core.internal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.wso2.carbon.identity.role.mgt.core.internal.RoleManagementServiceComponentHolder;
import org.wso2.carbon.identity.role.mgt.core.util.GroupIDResolver;
import org.wso2.carbon.identity.role.mgt.core.util.UserIDResolver;
import org.wso2.carbon.identity.scim2.common.utils.SCIMCommonUtils;
import org.wso2.carbon.user.api.RealmConfiguration;
import org.wso2.carbon.user.api.UserRealm;
import org.wso2.carbon.user.api.UserStoreException;
Expand Down Expand Up @@ -1479,7 +1480,8 @@ public String getRoleNameByID(String roleID, String tenantDomain) throws Identit
+ tenantDomain;
throw new IdentityRoleManagementServerException(UNEXPECTED_SERVER_ERROR.getCode(), errorMessage, e);
}
if (roleName == null) {
// Verify whether the roleName is either null or it's not contain any prefix Application/Internal
if (roleName == null || !SCIMCommonUtils.isHybridRole(roleName)) {
String errorMessage = "A role doesn't exist with id: " + roleID + " in the tenantDomain: " + tenantDomain;
throw new IdentityRoleManagementClientException(ROLE_NOT_FOUND.getCode(), errorMessage);
}
Expand Down
9 changes: 9 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1758,6 +1758,13 @@
<artifactId>xmlbeans</artifactId>
<version>${xmlbeans.version}</version>
</dependency>

<!-- Identity inbound provisioning scim2 component -->
<dependency>
<groupId>org.wso2.carbon.identity.inbound.provisioning.scim2</groupId>
<artifactId>org.wso2.carbon.identity.scim2.common</artifactId>
<version>${org.wso2.carbon.identity.scim2.common.version}</version>
</dependency>
</dependencies>

</dependencyManagement>
Expand Down Expand Up @@ -1811,6 +1818,8 @@
<org.wso2.carbon.identity.organization.management.core.version.range>[1.0.0, 2.0.0)
</org.wso2.carbon.identity.organization.management.core.version.range>

<org.wso2.carbon.identity.scim2.common.version>3.4.18</org.wso2.carbon.identity.scim2.common.version>

<!--Carbon registry version-->
<org.wso2.carbon.registry.version>4.8.12</org.wso2.carbon.registry.version>
<carbon.registry.common.imp.pkg.version.range>[0.0.0,1.0.0)</carbon.registry.common.imp.pkg.version.range>
Expand Down

0 comments on commit 80a1a5d

Please sign in to comment.