From 8ce8eb32f79610b89003e2c156df8f0396c9f844 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Mon, 11 Dec 2023 10:06:02 -1000 Subject: [PATCH] Hide Members option from non-workspace member --- src/pages/ReportDetailsPage.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/ReportDetailsPage.js b/src/pages/ReportDetailsPage.js index c5e6bf43fa1d..4493440b2e53 100644 --- a/src/pages/ReportDetailsPage.js +++ b/src/pages/ReportDetailsPage.js @@ -105,7 +105,10 @@ function ReportDetailsPage(props) { return items; } - if ((!isUserCreatedPolicyRoom && participants.length) || (isUserCreatedPolicyRoom && (!ReportUtils.isPublicRoom(props.report) || isPolicyMember))) { + // The Members page is only shown when: + // - The report is not a user created room with participants to show i.e. DM, Group Chat, etc + // - The report is a user created room and the room and the current user is a workspace member i.e. non-workspace members should not see this option. + if ((!isUserCreatedPolicyRoom && participants.length) || (isUserCreatedPolicyRoom && isPolicyMember)) { items.push({ key: CONST.REPORT_DETAILS_MENU_ITEM.MEMBERS, translationKey: 'common.members',