Skip to content

Conversation

@fisx
Copy link
Contributor

@fisx fisx commented Nov 13, 2025

https://wearezeta.atlassian.net/browse/WPB-21682

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@fisx fisx added the not-ok-to-test Not approved for running tests in CI, this label is ignored if ok-to-test also exists on a PR label Nov 13, 2025
@fisx fisx marked this pull request as ready for review November 13, 2025 11:55
@fisx fisx requested review from a team as code owners November 13, 2025 11:55
@battermann battermann requested a review from Copilot November 13, 2025 12:41
Copilot finished reviewing on behalf of battermann November 13, 2025 12:44
Copy link
Contributor

Copilot AI left a 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-users endpoint

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.

@fisx fisx added ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist and removed not-ok-to-test Not approved for running tests in CI, this label is ignored if ok-to-test also exists on a PR labels Nov 13, 2025
@fisx fisx requested review from battermann and Copilot November 13, 2025 13:29
Copilot finished reviewing on behalf of fisx November 13, 2025 13:32
Copy link
Contributor

Copilot AI left a 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.

@fisx fisx requested a review from battermann November 13, 2025 15:11
@fisx fisx force-pushed the WPB-21682-fix-email-visibility-for-team-admin branch from 9c425d6 to 40adb0a Compare November 13, 2025 15:57
@fisx fisx force-pushed the WPB-21682-fix-email-visibility-for-team-admin branch from 9e5b4e9 to 815960c Compare November 13, 2025 17:10
@fisx
Copy link
Contributor Author

fisx commented Nov 14, 2025

at this point, the following brig integration tests fail:

'/basic \/calls\/config - 200/'
'/multiple servers using files \/calls\/config - 200/'
'/multiple servers using SRV \/calls\/config - 200/'
'/\/users\/.(Creator,EmailVisibleToSelf)/'
'/\/users\/.(Member,EmailVisibleToSelf)/'
'/\/users\/:uid.(Creator,EmailVisibleToSelf)/'
'/\/users\/:uid.(Member,EmailVisibleToSelf)/'

some of the failures look unrelated, but not flaky. strange.

@fisx fisx merged commit 07aa11c into develop Nov 18, 2025
10 checks passed
@fisx fisx deleted the WPB-21682-fix-email-visibility-for-team-admin branch November 18, 2025 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants