Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to delete non-last member of group #96

Open
turing-lihaitao opened this issue Apr 20, 2023 · 0 comments
Open

Failed to delete non-last member of group #96

turing-lihaitao opened this issue Apr 20, 2023 · 0 comments

Comments

@turing-lihaitao
Copy link

turing-lihaitao commented Apr 20, 2023

When I create a new group and add 3 members, the content I store in the database is as follows:

{
	"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
	"id": "a608ff25-b6f8-4bd6-a78a-771f8e039088",
	"externalId": "aaaaaa",
	"meta": {
		"resourceType": "Group",
		"created": "2023-04-20T15:33:35",
		"lastModified": "2023-04-20T16:10:58",
		"location": "/Groups/a608ff25-b6f8-4bd6-a78a-771f8e039088",
		"version": "W/\"02915506ddc93d91d2929c82b582749328925188\""
	},
	"displayName": "Group1DisplayName2",
	"members": [{
		"value": "1f01127a-076e-400c-b4d9-a30bb63e8c30"
	}, {
		"value": "fdab798c-8cea-4ab1-8c48-68b1969a1b16"
	}, {
		"value": "3d1d7217-e900-4ec9-a9ea-bb58c8beade6"
	}]
}

Next, when I try to delete the first and second members of the group, an error occurs as follows:

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:Error"
    ],
    "status": 400,
    "scimType": "noTarget",
    "detail": "noTarget: no target at index '2' from 'members'"
}

Body like this:

{
	"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
	"Operations": [{
		"op": "remove",
		"path": "members[value eq \"fdab798c-8cea-4ab1-8c48-68b1969a1b16\"]"
	}]
}

But removing the last member can be successful

I need how to fix this, because deleting members won't delete only the last one, Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant