-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hide Members option from non-workspace member #32857
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NAB but should we create a helper function that better describes these checks? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With the extra documentation here now it should be easier to understand the intended logic. In this case, it's nice to have the explanation on the report "details" page vs. abstracted somewhere. |
||
items.push({ | ||
key: CONST.REPORT_DETAILS_MENU_ITEM.MEMBERS, | ||
translationKey: 'common.members', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A tiny thing, but shouldn't it be "etc." instead of "etc"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okey, not necessarily I guess: https://en.wikipedia.org/wiki/Et_cetera