Skip to content

Commit

Permalink
Fix role update with add
Browse files Browse the repository at this point in the history
  • Loading branch information
kayathiri4 committed Oct 10, 2024
1 parent bd6dff9 commit 677eacc
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.user.core.UserCoreConstants;
import org.wso2.carbon.user.core.common.AbstractUserStoreManager;
import org.wso2.carbon.user.core.util.UserCoreUtil;
import org.wso2.charon3.core.exceptions.BadRequestException;
import org.wso2.charon3.core.exceptions.CharonException;
import org.wso2.charon3.core.exceptions.ConflictException;
Expand Down Expand Up @@ -812,11 +813,9 @@ private void prepareAddedRemovedUserLists(Set<String> addedMembers, Set<String>
userStoreManager.getUserListWithID(SCIMConstants.CommonSchemaConstants.ID_URI,
memberObject.get(SCIMConstants.CommonSchemaConstants.VALUE), null);
if (isNotEmpty(userListWithID)) {
String tempDisplay = userListWithID.get(0).getUsername();
if(StringUtils.isNotBlank(userListWithID.get(0).getUserStoreDomain())) {
tempDisplay = userListWithID.get(0).getUserStoreDomain() + "/" + tempDisplay;
}
memberObject.put(SCIMConstants.RoleSchemaConstants.DISPLAY, tempDisplay);
memberObject.put(SCIMConstants.RoleSchemaConstants.DISPLAY,
UserCoreUtil.addDomainToName(userListWithID.get(0).getUsername(),
userListWithID.get(0).getUserStoreDomain()));
memberOperation.setValues(memberObject);
}
}
Expand Down

0 comments on commit 677eacc

Please sign in to comment.