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

[SCIM] delete a group with a member #698

Closed
danflomin opened this issue Feb 18, 2024 · 4 comments
Closed

[SCIM] delete a group with a member #698

danflomin opened this issue Feb 18, 2024 · 4 comments
Assignees

Comments

@danflomin
Copy link
Collaborator

Hello, how are you?

I noticed that when you DELETE a group that already has a member in it, GET on the user still shows that he is a member of the group but as an "indirect" membership.

Can you reproduce this as well?

Kind regards
Dan

@danflomin
Copy link
Collaborator Author

I think it happens in DeleteRepresentationCommandHandler.cs in

await _scimRepresentationCommandRepository.BulkInsert(reference.AddedRepresentationAttributes).ConfigureAwait(false);

For some reason the same attributes that are removed are also added.
Should we just remove this line?

@simpleidserver
Copy link
Owner

simpleidserver commented Feb 18, 2024

Hello,

I have verified on my local machine, and the HTTP DELETE request is functioning correctly for all the scenarios outlined below:

First scenario

  1. create a group G1.with one user in it.
  2. create a user U1.
  3. Assign the user to the group.
  4. Remove the group.

Result : the groups property of the user is removed.

Second scenario

  1. Create a group G1.
  2. Create a group G2.
  3. Create a user U1.
  4. Assign the group G1 to the group G2.
  5. Assign the user to the group G1.
  6. Remove the group G1.

Result : the groups property of the user is removed.

Could you please provide more details and explain how to reproduce this problem? :)

The portion of code you mentioned in your comment is not needed and can be commented out.
Normally, the reference.AddedRepresentationAttribute list, must always be empty.

@danflomin
Copy link
Collaborator Author

danflomin commented Feb 18, 2024 via email

@simpleidserver
Copy link
Owner

Okay, of course :) I'll comment the code in the 'master' branch.

@simpleidserver simpleidserver moved this from In Progress to Done in @simpleidserver's Release 4.0.8 Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

2 participants