fix: member setting role edit validation (#5278)

This commit is contained in:
Anmol Singh Bhatia 2024-07-31 17:12:53 +05:30 committed by GitHub
parent 18df1530c1
commit 67f2e2fdb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -97,11 +97,11 @@ export const AccountTypeColumn: React.FC<AccountTypeProps> = observer((props) =>
// derived values
const isCurrentUser = currentUser?.id === rowData.member.id;
const isAdminRole = currentProjectRole === EUserProjectRoles.ADMIN;
const isRoleEditable = isCurrentUser && isAdminRole;
const isRoleNonEditable = isCurrentUser || !isAdminRole;
return (
<>
{isRoleEditable ? (
{isRoleNonEditable ? (
<div className="w-32 flex ">
<span>{ROLE[rowData.role as keyof typeof ROLE]}</span>
</div>