Skip to content

fix(versioning): global admins have implicit access to all repos - #18

Merged
SammyBytes merged 2 commits into
mainfrom
fix/global-admin-implicit-repo-access
Aug 31, 2026
Merged

fix(versioning): global admins have implicit access to all repos#18
SammyBytes merged 2 commits into
mainfrom
fix/global-admin-implicit-repo-access

Conversation

@SammyBytes

Copy link
Copy Markdown
Owner

Any user with isGlobalAdmin=true resolves to role='admin' on any existing repo (data endpoints). Removes the chicken-and-egg that locked out operators provisioning from one account and using another. Role-management endpoints already had this bypass; data endpoints did not. 277 unit tests pass; lint clean.

Before: a global admin hitting /repos/:id/log (or any data endpoint)
without an explicit per-repo role grant got a 403, even though
isGlobalAdmin=true is the highest privilege the system grants. The
role-management helpers (requireRepoRoleOrGlobalAdmin) already had this
bypass, but the data endpoints did not. Operators provisioning a repo
from one account, then logging in with another (e.g. a personal
'hemiblade' alongside the bootstrap 'admin'), got locked out.

After: any user with isGlobalAdmin=true resolves to role='admin' on
any repo that exists. The non-admin fallback is unchanged.

277 unit tests pass; lint clean.
… change

The test name + assertion + comment described the OLD design (global
admin does NOT get implicit data access). The new design (see
fix/global-admin-implicit-repo-access) does grant implicit access, so
the test now asserts 200 instead of 403 with a comment explaining the
real-world motivation (operator locked out of their own repo when
switching accounts).
@SammyBytes
SammyBytes merged commit 22ffc15 into main Aug 31, 2026
2 checks passed
@SammyBytes
SammyBytes deleted the fix/global-admin-implicit-repo-access branch August 31, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant