Skip to content

fix: require admin permission for repository deletion - #14

Merged
tobi merged 1 commit into
tobi:mainfrom
immanuwell:fix/admin-repo-delete
Aug 27, 2026
Merged

fix: require admin permission for repository deletion#14
tobi merged 1 commit into
tobi:mainfrom
immanuwell:fix/admin-repo-delete

Conversation

@immanuwell

@immanuwell immanuwell commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Fixes #10

A write token with admin = false could delete the whole repo.
One DELETE and repo gone

Repro before this fix:

  1. Configure a token with write = true, admin = false
  2. Create a repo with that token
  3. Call DELETE /owner/repo/api
  4. It returns 204; the next GET returns 404

Deletion now uses the existing admin check.
Creation still needs write permission.
Added coverage for the root, API, and browser routes, plus updated the docs

Tests:
just web-build
just test
just e2e
just warnings

@tobi
tobi merged commit 6d8fa54 into tobi:main Aug 27, 2026
2 checks passed
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.

DELETE /{owner}/{repo} gates on write, not admin

2 participants