Decoding GitHub Permissions: What's Your Effective Access in Multi-Team Orgs?
Navigating GitHub permissions can feel like a maze, especially when you're part of multiple teams within an organization, each with varying levels of access to the same repository. This common scenario often leaves developers wondering: "What's my actual, effective access?" A recent discussion on the GitHub Community forum highlighted this exact dilemma, providing clarity on GitHub's permission model and practical workarounds.
The "Highest Permission Wins" Rule
The core takeaway from the community discussion is clear: GitHub's permission model always grants the highest (most permissive) level of access across all your assignments. If you're in Team A with 'maintain' access and Team B with 'triage' access to the same repository, you will effectively have 'maintain' access. The lower-level permissions do not dilute or downgrade your capabilities.
The standard hierarchy of permissions, from least to most permissive, is:
- Read
- Triage (Read + manage issues/PRs/discussions)
- Write (Triage + push code)
- Maintain (Write + most repository settings, like branch protections)
- Admin (Full control, including deleting the repository and managing access)
This principle applies universally, whether access is granted through teams, direct collaborator assignments, organization base permissions, or even enterprise-level grants. The most privileged tier always takes precedence, a fundamental aspect of how GitHub functions as an engineering project management software.
The Visibility Gap: Where to See Your Access
One of the most pressing questions from the original post was about finding a dedicated view for individual effective access. Unfortunately, as confirmed by community experts, there is currently no native "My Permissions" page for standard organization members to explicitly see their computed access level for a specific repository. This information is typically only visible to Organization Owners or Repository Admins via the repository's Settings > Collaborators and teams page.
Practical Workarounds for Verifying Your Access
Despite the lack of a direct UI for individual users, the community offered several effective ways to deduce or confirm your access:
- Deduce via UI Capabilities: Your visible options within the repository can hint at your access level. For instance, if you can see and interact with the "Settings" tab at the top of a repository (and it's not greyed out), you likely have 'maintain' or 'admin' access, as 'triage', 'read', and 'write' roles cannot access repository settings. Similarly, the ability to manage branch protections confirms 'maintain' or higher.
- Ask an Admin: The simplest method for many is to request an Organization Owner or Repository Admin to check your effective permissions directly through their administrative views.
- Utilize the GitHub API: For developers comfortable with command-line tools, the GitHub API provides a definitive way to query your effective permissions.
Using GraphQL to Query Permissions:
You can query your viewerPermission via GraphQL, which returns the effective enum with all sources factored in:
gh api graphql -f query=' { repository(owner: "YOUR-ORG", name: "TARGET-REPO") { viewerPermission } }'
This will return ADMIN, MAINTAIN, WRITE, TRIAGE, or READ.
Using REST API to Query Permissions:
The REST API's GET /repos/{owner}/{repo} endpoint includes a permissions object:
gh api repos/YOUR-ORG/TARGET-REPO --jq .permissions
This returns a JSON object with boolean flags like {admin, maintain, push, triage, pull}. Remember to send your authentication token, as this object is omitted in unauthenticated calls.
Important Caveats
While "highest role wins" determines your assigned role, it doesn't mean you can do absolutely everything. Even 'maintain' access has limitations; you cannot manage team/collaborator access, change repository visibility, delete/transfer/archive the repository, or modify security & analysis settings. Additionally, custom repository roles and branch rulesets (especially in GitHub Enterprise Cloud) can further refine or restrict specific actions.
Understanding these nuances is crucial for effective collaboration and security within any organization utilizing GitHub as its primary engineering project management software. If you find this lack of a direct "My Permissions" view problematic, consider filing a feedback request with GitHub to advocate for its inclusion.
