Extend Org Admin Authority to Team Management - #493
Open
Dharp02 wants to merge 1 commit into
Open
Conversation
- isTeamAdminOrOrgOwner now recognizes org admins (not just owners) via org_members - Add legacy org document admins/owners fallback in resolveOrgRoleForTeam - teams.byUser publication includes all org teams for owner/admin members - teams.list method includes org teams and join requests for elevated members - buildTeamAbility grants team-admin capability to org-elevated users
🚀 Preview Deployment Ready
Preview auto-deletes when this PR is closed. |
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.
Overview
Extends org admin authority to cover team management operations. Previously only org owners had elevated team access; org admins are now treated equally, and the code now checks both the modern
org_memberscollection and the legacyowners/adminsarrays on the org document.Changes
meteor-backend/server/org-helpers.jsisTeamAdminOrOrgOwnernow checksorg_membersforowneroradminrole (not just owner)org.ownersandorg.adminsarrays for pre-migration datameteor-backend/server/permissions.jsresolveOrgRoleForTeamgains a legacy fallback: checksorg.owners/org.adminsarrays whenorg_membershas no matching recordbuildTeamAbilitynow grantsteamAdminIdsto org-elevated users (owner or admin), not just directteam.adminsmembersmeteor-backend/server/teams.jsteams.byUserpublication (nowasync) surfaces all non-personal org teams for org owners/adminsteams.listmethod applies the same elevated filter and includes join requests for all org teams the elevated user administersAcceptance Criteria
owners/adminsarrays but noorg_membersrecords) still grant correct authority