Skip to content

[WPB-23806] (Un-)suspend apps if en-/disabled in the team.#5177

Open
fisx wants to merge 7 commits intodevelopfrom
WPB-23806-_un-_suspend-apps-if-en-_disabled-in-the-team
Open

[WPB-23806] (Un-)suspend apps if en-/disabled in the team.#5177
fisx wants to merge 7 commits intodevelopfrom
WPB-23806-_un-_suspend-apps-if-en-_disabled-in-the-team

Conversation

@fisx
Copy link
Copy Markdown
Contributor

@fisx fisx commented Apr 11, 2026

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

Checklist

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

@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Apr 11, 2026
@fisx fisx force-pushed the WPB-23806-_un-_suspend-apps-if-en-_disabled-in-the-team branch from b270ee6 to b1dd185 Compare April 15, 2026 06:55
- add SetAccountStatus, GetAppIdsForTeam to BrigAPIAccess,
- remove UserProfileFilter,
- revert GetLocalUserProfilesFiltered to GetLocalUserProfiles,
- introduce GetLocalAppProfilesOnly (dedicated & scalable),
- instance SetFeatureConfig AppsConfig now (un-)suspends all apps in team.
@fisx fisx force-pushed the WPB-23806-_un-_suspend-apps-if-en-_disabled-in-the-team branch from b1dd185 to 67e1718 Compare April 15, 2026 08:31
@fisx fisx requested a review from Copilot April 15, 2026 11:37
@fisx fisx marked this pull request as ready for review April 15, 2026 11:38
@fisx fisx requested review from a team as code owners April 15, 2026 11:38
Copy link
Copy Markdown
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

Implements app account (un-)suspension when the team-level apps feature is toggled, by wiring Galley’s team feature updates to Brig account-status updates and adding supporting internal APIs.

Changes:

  • Add Galley AppsConfig feature hook to suspend/unsuspend all app users in a team via Brig.
  • Add Brig internal endpoint to list app user IDs for a team, plus corresponding BrigAPIAccess RPC calls.
  • Refactor Brig public “get app(s)” logic and extend UserSubsystem with GetLocalAppProfilesOnly, plus an integration test covering the suspend/unsuspend behavior.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
services/galley/src/Galley/API/Teams/Features.hs On apps feature enable/disable, fetch team app IDs from Brig and set their account status accordingly.
services/brig/src/Brig/API/Public.hs Adjust app profile retrieval/listing to use the updated UserSubsystem API and a team-app-only path.
services/brig/src/Brig/API/Internal.hs Add internal handler to return app user IDs for a team (for Galley to consume).
libs/wire-subsystems/test/unit/Wire/MockInterpreters/UserSubsystem.hs Update mock interpreter for new UserSubsystem constructors.
libs/wire-subsystems/src/Wire/UserSubsystem/Interpreter.hs Implement GetLocalUserProfiles and new GetLocalAppProfilesOnly using AppStore.
libs/wire-subsystems/src/Wire/UserSubsystem.hs Remove UserProfileFilter API and add GetLocalAppProfilesOnly to the effect API.
libs/wire-subsystems/src/Wire/BrigAPIAccess/Rpc.hs Add RPC calls for listing team app IDs and setting account status.
libs/wire-subsystems/src/Wire/BrigAPIAccess.hs Expose new Brig API access operations in the effect.
libs/wire-api/src/Wire/API/Routes/Internal/Brig.hs Add the internal route definition for GET /i/teams/:tid/apps.
integration/test/Test/FeatureFlags/Apps.hs Add integration test asserting apps are suspended on disable and reactivated on enable.
changelog.d/3-bug-fixes/WPB-23806-_un-_suspend-apps-if-en-_disabled-in-the-team Changelog entry for the behavior change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

fisx and others added 3 commits April 15, 2026 13:50
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This reverts commit 82eb5b3.
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.

3 participants