kjthorpe18 commented on issue #427:
URL:
https://github.com/apache/directory-scimple/issues/427#issuecomment-1850082458
I looked at the RFC again and I believe I was misunderstanding `replace` ops
with Group members. I don't think it's possible to replace one `member` value
with another, but rather a `replace` on `members` replaces _all_ of the members
with a specified list.
```
The following example shows how to replace all of the members of a
group with a different members list in a single replace operation.
Some text was removed for readability (indicated by "..."):
PATCH /Groups/acbf3ae7-8463-4692-b4fd-9b4da3f908ce
Host: example.com
Accept: application/scim+json
Content-Type: application/scim+json
Authorization: Bearer h480djs93hd8
If-Match: W/"a330bc54f0671c9"
{
"schemas":
["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [{
"op":"replace",
"path":"members",
"value":[
{
"display": "Babs Jensen",
"$ref":
"https://example.com/v2/Users/2819c223...413861904646",
"value": "2819c223...413861904646"
},
{
"display": "James Smith",
"$ref":
"https://example.com/v2/Users/08e1d05d...473d93df9210",
"value": "08e1d05d...473d93df9210"
}
]
}]
}
```
So, at least with group membership PATCH generation, `replace` is a bit more
nuanced. You could still `remove` every user and `add` another, but it's not as
I though `1 add + `1 remove` = `1 replace`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]