-
Notifications
You must be signed in to change notification settings - Fork 334
WPB-21704 [fix] manage Channels via TM #4847
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
WPB-21704 [fix] manage Channels via TM #4847
Conversation
c8243e2 to
c9ba2fd
Compare
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 a bug where team admins received 403 errors when attempting to manage channels they were members of with conversation_role set to wire_member. The fix introduces a new ManageChannels permission that allows team admins/owners to manage channels regardless of their conversation role.
- Introduces a new
ManageChannelshidden permission for team owners and admins - Refactors permission checking logic to use
ActorContextinstead ofConvOrTeamMemberto properly handle both conversation and team member contexts - Updates all channel management operations (add, remove, replace members, rename, etc.) to respect the new permission
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| libs/wire-api/src/Wire/API/Team/Member.hs | Adds the ManageChannels hidden permission to the HiddenPerm enum and assigns it to owner/admin roles |
| services/galley/src/Galley/API/Util.hs | Replaces ensureChannelAndTeamAdmin with ensureManageChannelsPermission and refactors ConvOrTeamMember to ActorContext |
| services/galley/src/Galley/API/Action.hs | Updates permission checks to use ActorContext and adds channelAdminOverride logic to bypass conversation role checks for team admins with ManageChannels |
| services/galley/src/Galley/API/Update.hs | Introduces MLSCommitMode type, updates member operations to use new permission checks, and improves channel-specific removal logic |
| services/galley/src/Galley/API/Query.hs | Simplifies ensureConvAdmin to use the new hasManageChannelsPermission helper |
| services/galley/src/Galley/API/Public/Conversation.hs | Updates API endpoints to pass WithoutCommit mode to addMembers and replaceMembers |
| services/galley/test/integration/API.hs | Updates test expectation from InternalAdd to ExternalAdd to match new behavior |
| integration/test/Test/Channels.hs | Adds comprehensive integration test covering add, remove, and replace member operations for team admins managing channels |
| changelog.d/3-bug-fixes/WPB-21704 | Documents the bug fix in the changelog |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
determin join type by MLSCommitMode flag more test cases and fixes removed obsolete code fix old test ConvOrTeamMember with ActorContext add commet check ManageChannels permission instead of team member status
94a3e46 to
99f08df
Compare
https://wearezeta.atlassian.net/browse/WPB-21704
Checklist
changelog.d