Skip to content

Commit

Permalink
add better logic
Browse files Browse the repository at this point in the history
  • Loading branch information
sharma01ketan committed Oct 11, 2024
1 parent 793c39d commit 996e5e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/core/components/project/settings/member-columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ export const AccountTypeColumn: React.FC<AccountTypeProps> = observer((props) =>
const isWorkspaceMember = [EUserPermissions.MEMBER].includes(
Number(getWorkspaceMemberDetails(rowData.member.id)?.role) ?? EUserPermissions.GUEST
);
const isCurrentUserProjectMember = getProjectMemberDetails(currentUser?.id ?? "")?.role == EUserPermissions.MEMBER;
const isCurrentUserProjectMember = currentUser
? getProjectMemberDetails(currentUser.id)?.role === EUserPermissions.MEMBER
: false;
const isRoleNonEditable =
isCurrentUser || (isProjectAdminOrGuest && !isWorkspaceMember) || isCurrentUserProjectMember;

Expand Down

0 comments on commit 996e5e8

Please sign in to comment.