Skip to content

feat(auth): Permissions for package repositories#38140

Draft
smiley8D wants to merge 2 commits into
go-gitea:mainfrom
smiley8D:main
Draft

feat(auth): Permissions for package repositories#38140
smiley8D wants to merge 2 commits into
go-gitea:mainfrom
smiley8D:main

Conversation

@smiley8D

@smiley8D smiley8D commented Jun 16, 2026

Copy link
Copy Markdown

Resolves #20596

Packages assigned to a non-organization repository will be set to private WebUI access if the repository is set to non-public access. For the API, this also applies at least to OCI images. This is a limited solution to the attached issue, but I provides the vast majority of requested changes (based on posted issues) without requiring as many code changes.

A couple of limitations/things to consider:

  • Packages do not inherit the full permission settings of a repo on attachment. Repo permission settings are significantly more complex and can involve teams, granular permissions, etc. This PR only considers if the repository is marked public or not.
  • If the repository is non-public, the package is only accessible by the package owner. I did not want to make decisions about cases where packages are attached to repos with different owner or if repo ownership changes.
  • Packages are still listed if a user's profile is public. This would likely require larger code changes.
  • API only enforces for OCI packages. This appears to be the most requested use case.
  • Needs testing for non-v2 API routes, but I only used the docker CLI client so was not able to confirm packages are unreachable on other API routes.

@GiteaBot

Copy link
Copy Markdown
Collaborator

@smiley8D I noticed you've updated the locales for non-English languages. These will be overwritten during the sync from our translation tool Crowdin. If you'd like to contribute your translations, please visit https://crowdin.com/project/gitea. Please revert the changes done on these files. 🍵

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 16, 2026
@GiteaBot

Copy link
Copy Markdown
Collaborator

@smiley8D I noticed you've updated the locales for non-English languages. These will be overwritten during the sync from our translation tool Crowdin. If you'd like to contribute your translations, please visit https://crowdin.com/project/gitea. Please revert the changes done on these files. 🍵

@smiley8D smiley8D force-pushed the main branch 2 times, most recently from 5fec74d to 1efdab3 Compare June 17, 2026 10:10
@smiley8D smiley8D changed the title Permissions for package repositories feat(api): Permissions for package repositories Jun 17, 2026
@smiley8D smiley8D changed the title feat(api): Permissions for package repositories feat(auth): Permissions for package repositories Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Permissions for package repositories

2 participants