elimity-com / scim

Golang Implementation of the SCIM v2 Specification
MIT License
177 stars 55 forks source link

PATCH operation "remove" does not parse value #148

Closed jcastro1019 closed 1 year ago

jcastro1019 commented 2 years ago

A set of users cannot be removed from a group using the "remove" operation because the operation value is always set to nil (Ref: https://github.com/elimity-com/scim/blob/master/internal/patch/patch.go#L105); thus, all members will be removed.

Example usage:

PATCH https://mycompany.my.salesforce.com/services/scim/v2/Groups/<group_id>

{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:PatchOp"
  ],
  "Operations": [
    {
      "op": "remove",
      "path": "members",
      "value": {
        "members": [
          {
            "value": "<user_id>"
          }
        ]
      }
    }
  ]
}

Ref: (https://help.salesforce.com/s/articleView?id=sf.identity_scim_manage_groups.htm&type=5 section: "Remove a User from a Group")

q-uint commented 1 year ago

Fixed in #152