Skip to content

Commit

Permalink
Merge pull request #41380 from GandalfGwaihir/issue41280
Browse files Browse the repository at this point in the history
[Access control]: Hide options `visibility` and `room name` for invoices
  • Loading branch information
cristipaval authored May 1, 2024
2 parents 5f50430 + 8b2815c commit 573d989
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/settings/Report/ReportSettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function ReportSettingsPage({report, policies}: ReportSettingsPageProps) {
const isMoneyRequestReport = ReportUtils.isMoneyRequestReport(report);

const shouldDisableSettings = isEmptyObject(report) || ReportUtils.isArchivedRoom(report) || ReportUtils.isSelfDM(report);
const shouldShowRoomName = !ReportUtils.isPolicyExpenseChat(report) && !ReportUtils.isChatThread(report);
const shouldShowRoomName = !ReportUtils.isPolicyExpenseChat(report) && !ReportUtils.isChatThread(report) && !ReportUtils.isInvoiceRoom(report);
const notificationPreference =
report?.notificationPreference && report.notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN
? translate(`notificationPreferencesPage.notificationPreferences.${report.notificationPreference}`)
Expand Down Expand Up @@ -149,6 +149,7 @@ function ReportSettingsPage({report, policies}: ReportSettingsPageProps) {
)}
</View>
{!!report?.visibility &&
report.chatType !== CONST.REPORT.CHAT_TYPE.INVOICE &&
(shouldAllowChangeVisibility ? (
<MenuItemWithTopDescription
shouldShowRightIcon
Expand Down

0 comments on commit 573d989

Please sign in to comment.