[WPB-23995] fix app access in search, fetch. - #5173
Merged
Merged
Conversation
fisx
force-pushed
the
WPB-23995-app-visibility-2
branch
2 times, most recently
from
April 9, 2026 15:51
6d3e959 to
c3617cc
Compare
fisx
marked this pull request as ready for review
April 9, 2026 19:51
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens app user visibility so that apps are only discoverable within their own team, affecting contact search as well as app/user fetch paths in Brig and the UserSubsystem.
Changes:
- Introduces team-aware app filtering via new
UserProfileFiltervariants and applies it across local profile fetch paths. - Updates contact search (ElasticSearch query) to exclude app users from other teams (or all apps when the searcher has no team).
- Adjusts public and federation endpoints plus integration/unit tests and adds a changelog entry.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| services/brig/src/Brig/API/Public.hs | Enforces same-team access for getApp and filters getApps by team. |
| services/brig/src/Brig/API/Federation.hs | Ensures federated fetch/search paths do not return apps by default (Nothing team). |
| libs/wire-subsystems/src/Wire/UserSubsystem.hs | Reworks UserProfileFilter and makes local profile fetch APIs team-aware for app visibility. |
| libs/wire-subsystems/src/Wire/UserSubsystem/Interpreter.hs | Selects profile filter based on requester’s team and re-filters after app-info injection. |
| libs/wire-subsystems/src/Wire/IndexedUserStore/ElasticSearch.hs | Excludes apps from other teams in /search/contacts ES query. |
| libs/wire-subsystems/src/Wire/UserGroupSubsystem/Interpreter.hs | Adapts to new getLocalUserProfiles signature with team context. |
| libs/wire-subsystems/src/Wire/StoredUser.hs | Custom Arbitrary instance to avoid generating bots/service users in tests. |
| libs/wire-subsystems/test/unit/Wire/UserSubsystem/InterpreterSpec.hs | Updates unit test call sites for new getLocalUserProfiles signature. |
| libs/wire-subsystems/test/unit/Wire/MockInterpreters/UserSubsystem.hs | Extends mock interpreter to support the expanded UserProfileFilter. |
| integration/test/Test/Search.hs | Simplifies federated search test expectations (but reduces type-filter coverage). |
| integration/test/Test/Apps.hs | Updates app tests to assert cross-team/teardless access restrictions + search visibility. |
| changelog.d/3-bug-fixes/WPB-23995-app-visibility-2 | Documents the behavior change for app visibility. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
blackheaven
approved these changes
Apr 9, 2026
(The "app" aspect of this test was redundant, see "Test.Apps".)
fisx
force-pushed
the
WPB-23995-app-visibility-2
branch
from
April 11, 2026 14:07
43cef82 to
1a247cf
Compare
This is needed for clients in remote convs to see all conv participants.
App profiles are now shown like regular profiles everywhere except in end-points "get-app", "get-apps".
fisx
force-pushed
the
WPB-23995-app-visibility-2
branch
from
April 13, 2026 09:05
2a05e7d to
a4a1ac2
Compare
fisx
force-pushed
the
WPB-23995-app-visibility-2
branch
from
April 13, 2026 10:19
a85fe63 to
60c5ee3
Compare
fisx
force-pushed
the
WPB-23995-app-visibility-2
branch
from
April 14, 2026 08:43
8b960f3 to
d1580d1
Compare
This was referenced Apr 16, 2026
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
changelog.d