Skip to content

Commit

Permalink
Merge pull request #26298 from Expensify/beaman-disallowLeavingPolicy…
Browse files Browse the repository at this point in the history
…ExpenseChats

Disallow leaving policy expense chats
  • Loading branch information
MariaHCD authored Aug 30, 2023
2 parents e6f439d + dbdbf0e commit dc85c60
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3093,6 +3093,7 @@ function getMoneyRequestOptions(report, reportParticipants, betas) {
* `public_announce` - Only non-policy members can leave (it's auto-shared with policy members)
* `policy_admins` - Nobody can leave (it's auto-shared with all policy admins)
* `policy_announce` - Nobody can leave (it's auto-shared with all policy members)
* `policyExpenseChat` - Nobody can leave (it's auto-shared with all policy members)
* `policy` - Anyone can leave (though only policy members can join)
* `domain` - Nobody can leave (it's auto-shared with domain members)
* `dm` - Nobody can leave (it's auto-shared with users)
Expand All @@ -3109,6 +3110,7 @@ function canLeaveRoom(report, isPolicyMember) {
if (
report.chatType === CONST.REPORT.CHAT_TYPE.POLICY_ADMINS ||
report.chatType === CONST.REPORT.CHAT_TYPE.POLICY_ANNOUNCE ||
report.chatType === CONST.REPORT.CHAT_TYPE.POLICY_EXPENSE_CHAT ||
report.chatType === CONST.REPORT.CHAT_TYPE.DOMAIN_ALL ||
_.isEmpty(report.chatType)
) {
Expand Down

0 comments on commit dc85c60

Please sign in to comment.