Skip to main content

Replace all grants for a user

PUT 

/user/:id/grant

Replace all existing grants for a user with a new set of grants. This operation deletes all existing grants and creates the new ones.

  • Send an empty array [] to remove all grants from the user.
  • Send a non-empty array to replace all grants with the specified ones.

The operation is transactional: if any new grant fails validation, no changes are made.

You can use either role_id or role_slug for each grant in the request.

Request

Responses

Grants were replaced successfully.