Skip to content

Commit

Permalink
Merge pull request #44595 from tienifr/fix/42928
Browse files Browse the repository at this point in the history
fix: workspace chat owner can be removed
  • Loading branch information
techievivek authored Jul 2, 2024
2 parents 551c6cb + 88798cd commit 9fbbbfb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/RoomMembersPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,11 @@ function RoomMembersPage({report, session, policies}: RoomMembersPageProps) {
}
const pendingChatMember = report?.pendingChatMembers?.findLast((member) => member.accountID === accountID.toString());
const isAdmin = !!(policy && policy.employeeList && details.login && policy.employeeList[details.login]?.role === CONST.POLICY.ROLE.ADMIN);
const isDisabled = (isPolicyExpenseChat && isAdmin) || accountID === session?.accountID || pendingChatMember?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;
const isDisabled =
(isPolicyExpenseChat && isAdmin) ||
accountID === session?.accountID ||
pendingChatMember?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE ||
details.accountID === report.ownerAccountID;

result.push({
keyForList: String(accountID),
Expand Down

0 comments on commit 9fbbbfb

Please sign in to comment.