Skip to content

Commit

Permalink
Merge pull request #395 from PasinduYeshan/fix/v2-role-replace
Browse files Browse the repository at this point in the history
Fixed empty value object issue inside v2 role patch operation
  • Loading branch information
AnuradhaSK authored Oct 26, 2023
2 parents de914f2 + d125c71 commit fc1db10
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,9 @@ private void processValueAttributeOfOperation(SCIMResourceTypeSchema schema, Pat
}

Map<String, Attribute> attributeList = attributeHoldingSCIMObject.getAttributeList();
if (attributeList.isEmpty()) {
throw new BadRequestException(ResponseCodeConstants.DESC_BAD_REQUEST, ResponseCodeConstants.INVALID_SYNTAX);
}

if (attributeList.containsKey(SCIMConstants.RoleSchemaConstants.DISPLAY_NAME)) {
patchOperation.setAttributeName(SCIMConstants.RoleSchemaConstants.DISPLAY_NAME);
Expand Down

0 comments on commit fc1db10

Please sign in to comment.