Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate package size quota using package creator ID instead of owner ID (#28007) #28030

Closed

Conversation

GiteaBot
Copy link
Collaborator

Backport #28007 by @d1nch8g

Changed behavior to calculate package quota limit using package creator ID instead of owner ID.

Currently, users are allowed to create an unlimited number of organizations, each of which has its own package limit quota, resulting in the ability for users to have unlimited package space in different organization scopes. This fix will calculate package quota based on package version creator ID instead of package version owner ID (which might be organization), so that users are not allowed to take more space than configured package settings.

Also, there is a side case in which users can publish packages to a specific package version, initially published by different user, taking that user package size quota. Version in fix should be better because the total amount of space is limited to the quota for users sharing the same organization scope.

…ad of owner ID (go-gitea#28007)

Changed behavior to calculate package quota limit using package `creator
ID` instead of `owner ID`.

Currently, users are allowed to create an unlimited number of
organizations, each of which has its own package limit quota, resulting
in the ability for users to have unlimited package space in different
organization scopes. This fix will calculate package quota based on
`package version creator ID` instead of `package version owner ID`
(which might be organization), so that users are not allowed to take
more space than configured package settings.

Also, there is a side case in which users can publish packages to a
specific package version, initially published by different user, taking
that user package size quota. Version in fix should be better because
the total amount of space is limited to the quota for users sharing the
same organization scope.
@GiteaBot GiteaBot added topic/packages type/enhancement An improvement of existing functionality labels Nov 13, 2023
@GiteaBot GiteaBot requested review from 6543 and silverwind November 13, 2023 23:39
@GiteaBot GiteaBot added this to the 1.21.0 milestone Nov 13, 2023
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 13, 2023
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 13, 2023
@6543 6543 changed the title packages: Calculate package size quota using package creator ID instead of owner ID (#28007) Calculate package size quota using package creator ID instead of owner ID (#28007) Nov 13, 2023
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Nov 13, 2023
Copy link
Member

@KN4CK3R KN4CK3R left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope

@GiteaBot GiteaBot added lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Nov 14, 2023
@6543 6543 modified the milestones: 1.21.0, 1.21.1 Nov 14, 2023
@6543 6543 closed this Nov 14, 2023
@6543 6543 removed this from the 1.21.1 milestone Nov 14, 2023
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Feb 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged size/S Denotes a PR that changes 10-29 lines, ignoring generated files. topic/packages type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants