From 8ce8eb32f79610b89003e2c156df8f0396c9f844 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Mon, 11 Dec 2023 10:06:02 -1000 Subject: [PATCH 1/2] 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', From ed8db59340d8ca90e4dd6a26cb797acf66424ef1 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Mon, 11 Dec 2023 10:15:06 -1000 Subject: [PATCH 2/2] Hide Members page if deep linking and not policy member --- src/pages/RoomMembersPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/RoomMembersPage.js b/src/pages/RoomMembersPage.js index 23722625b961..a48ab08408f2 100644 --- a/src/pages/RoomMembersPage.js +++ b/src/pages/RoomMembersPage.js @@ -237,7 +237,7 @@ function RoomMembersPage(props) { testID={RoomMembersPage.displayName} > Navigation.goBack(ROUTES.REPORT_WITH_ID_DETAILS.getRoute(props.report.reportID))} >