Skip to content

Resolve "Ability to delete identities for user"

What does this MR do?

Allows deletion of identities for users, as an admin, via the API.

Should be enough tests, but also tested locally after adding an identity to a user:

curl --request DELETE \
  --url http://localhost:3000/api/v4/users/22/identities/testing \
  --header 'private-token: FILLMEIN'

Are there points in the code the reviewer needs to double check?

  • Are the tests sufficient?
  • Is it OK that I moved identity destruction into a service? This ensures that we always use RepairLdapBlockedUserService.
  • Is it reasonable to offer just this endpoint without any further endpoints for listing identities? I assume so, as they are listed under a user as well.
  • Should we squash these commits? I feel as though they're fine as is, but not sure if you always require a single commit per issue/MR.

Why was this MR needed?

Identities can be deleted via the app, but not the API.

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #48739 (moved)

Edited by Jamie Schembri

Merge request reports

Loading