-
Notifications
You must be signed in to change notification settings - Fork 333
[WPB-21682] Fix email visibility for admin #4852
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
Conversation
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.
Pull Request Overview
This PR fixes email visibility for team admins and owners when querying user profiles via the POST /list-users endpoint. Previously, when email visibility was configured as "visible_to_self", even team admins couldn't see team members' emails. Now, admins and owners can see team member emails regardless of the configured email visibility setting.
Key Changes
- Modified email visibility logic to always grant email access to team admins and owners
- Added integration test to verify the fix
- Added API helper function for testing the
/list-usersendpoint
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| libs/wire-subsystems/src/Wire/UserSubsystem/Interpreter.hs | Updated getUserProfilesLocalPart to check if requesting user is admin/owner and override email visibility config accordingly |
| integration/test/Test/Teams.hs | Added test testListUsersEmailVisibility to verify admins can see team member emails even when visibility is set to "visible_to_self" |
| integration/test/API/Brig.hs | Added listUsers helper function to call the POST /list-users endpoint in tests |
| changelog.d/3-bug-fixes/fix-email-visibility-for-team-admin | Added changelog entry documenting the bug fix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9c425d6 to
40adb0a
Compare
9e5b4e9 to
815960c
Compare
|
at this point, the following brig integration tests fail: some of the failures look unrelated, but not flaky. strange. |
https://wearezeta.atlassian.net/browse/WPB-21682
Checklist
changelog.d