Skip to content

Commit

Permalink
Hide role selection in profile for admin users
Browse files Browse the repository at this point in the history
  • Loading branch information
sorja committed Feb 1, 2024
1 parent a6bc676 commit 125b373
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/components/EditUserForm/EditUserForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ const EditUserForm: React.FC<Props> = ({ user, canEditPermissions, canEditRoles,

const enabled = canEditUser
const isAdmin = Users.isAdministrator(userInfo)
const showRoleSelector = !Areas.isGlobal(countryIso) && isAdmin
const isCurrentUserAdmin = Users.isAdministrator(user)
const showRoleSelector = !Areas.isGlobal(countryIso) && isAdmin && !isCurrentUserAdmin

return (
<div className="edit-user__form-container">
Expand Down

0 comments on commit 125b373

Please sign in to comment.