Custom mutations for role assign
We need a custom mutation for updating admin and project lead roles to the user.
Linked FE ticket: https://git.ufz.de/rdm/biome/frontend/-/issues/475
AC
-
isAdmin: true
adds role admin to the user -
isAdmin: false
removes role admin to the user -
isProjectLead: true
adds role project lead to the user -
isProjectLead: false
removes role admin to the user -
only user with admin role can manage admin roles for other users -
Tests
Review
-
isAdmin: true
adds role admin to the user -
isAdmin: false
removes role admin to the user -
isProjectLead: true
adds role project lead to the user -
isProjectLead: false
removes role admin to the user -
only user with admin role can manage admin roles for other users -
Tests
mutation updateRoles(id: ID!, $admin: Boolean, $projectLead: Boolean) {
userUpdateRoles(input: {id: $id, isAdmin: $admin, isProjectLead: $projectLead}) {
user {
id
}
}
}
Edited by Michael Voigt