-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
UI preventing org repo creation as well if user org limit is reached #30011
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
Comments
I has try fix it in #15924, but sadly looks no one think it's a bug :( . maybe need a beter design about how to limit repository number for org. or repo number limit will looks meaningless if all user can create orgs. |
This is definitely a bug! The validation on the frontend does not match the validation in the backend! |
Partially fixed by #34030, Migrations still affected |
Yes, it is a bug, and thank you very much for finding the fix! ps; although #15924 was also proposed, but it is incomplete and didn't persuade others to really understand the problem ...... |
Uh oh!
There was an error while loading. Please reload this page.
Scenario
MAX_CREATION_LIMIT = 0
to prevent random new users from spamming our instanceDev
which hasCreate repositories
enabledProblem
Create Repository
is disabled in caseCanCreateRepo == false
:gitea/templates/repo/create.tmpl
Line 212 in 5c91d79
CanCreateRepo
checks whether the user already has too many personal repos:gitea/models/user/user.go
Lines 240 to 251 in 5c91d79
Create repositories
permission in their org!Solutions
CanCreateRepo
value should only influence creation of a personal repoNote that I was not able to reproduce the issue on the demo instance, because there is no repo count limit and also it seems like you can't create orgs there..
Screenshots
Trying to create a new repo

testrepo45
undertestorg
organization, note the banner telling me there is a limit:Submit button is disabled:

Repo create works anyway when enabling the submit button by hand:

Gitea Version
v1.21.9
The text was updated successfully, but these errors were encountered: