Coder Social home page Coder Social logo

Comments (4)

ArvindHarinder1 avatar ArvindHarinder1 commented on July 26, 2024

@steverash thanks for the feedback. Could you provide screenshots of a repro for #1? We're not able to repro it. We're trying to adhere to the standard as described in the screenshot below. We'll be able to address #2.

https://tools.ietf.org/html/rfc7644#section-3.5.2

image

from scimreferencecode.

steverash avatar steverash commented on July 26, 2024

@ArvindHarinder1 - I think the code above is assuming that if there is no value then it must be that it is trying to remove all members of the group. However that "value" is actually in the path, as per your example requests above.

For reproduction, here are the steps I went through with this sample app in postman

First, create a group with 2 members

{
  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
  "externalId":"ABCDEFE-B840-47E7-8FBE-543534534543",
  "displayName": "New group",
  "members":
  [
  	{
  		"value":"E367CCBD-B840-47E7-8FBE-B801A18DB3E3",
  		"display":"Test user 1"
  	},
  	{
  		"value":"A367CCBD-B840-47E7-8FBE-B801A18DB3BB",
  		"display":"Test user 2"
  	}	
  ]
}

Then remove a single member

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ],
    "Operations": [
        {
            "op": "remove",
            "path": "members[value eq \"E367CCBD-B840-47E7-8FBE-B801A18DB3E3\"]"
        }
    ]
}
  1. Get the group and you will see no members
{
    "meta": {
        "resourceType": "Group"
    },
    "displayName": "New group",
    "members": [],
    "externalId": "ABCDEFE-B840-47E7-8FBE-543534534543",
    "id": "e12450c3-2387-4cdd-ae3b-25ee1522acce",
    "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:Group"
    ]
}

from scimreferencecode.

steverash avatar steverash commented on July 26, 2024

As an alternative fix, I've put a PR in based on a fix I've done on my fork. PR is here : #14

from scimreferencecode.

ArvindHarinder1 avatar ArvindHarinder1 commented on July 26, 2024

Closed with this PR. #25

from scimreferencecode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.