[permissions] Update updateRole logic + disallow self role-assignment (#10476)
In this PR - updateWorkspaceMemberRole api was changed to stop allowing null as a valid value for roleId. it is not possible anymore to just unassign a role from a user. instead it is only possible to assign a different role to a user, which will unassign them from their previous role. For this reason in the FE the bins icons next to the workspaceMember on a role page were removed - updateWorkspaceMemberRole will throw if a user attempts to update their own role - tests tests tests!
This commit is contained in:
@ -7,7 +7,7 @@ export const UPDATE_WORKSPACE_MEMBER_ROLE = gql`
|
||||
${ROLE_FRAGMENT}
|
||||
mutation UpdateWorkspaceMemberRole(
|
||||
$workspaceMemberId: String!
|
||||
$roleId: String
|
||||
$roleId: String!
|
||||
) {
|
||||
updateWorkspaceMemberRole(
|
||||
workspaceMemberId: $workspaceMemberId
|
||||
|
||||
Reference in New Issue
Block a user