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

bug: Non-admins can not create repos for organizations #16575

Open
2 of 6 tasks
MGChecker opened this issue Jul 29, 2021 · 5 comments
Open
2 of 6 tasks

bug: Non-admins can not create repos for organizations #16575

MGChecker opened this issue Jul 29, 2021 · 5 comments
Labels
issue/not-a-bug The reported issue is the intended behavior or the problem is not inside Gitea type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@MGChecker
Copy link

If a non-admin tries to create a repository inside an organization they own, they get an error their repository limit would be reached. In my configuration the default repository limit for users is 0.

Specifically, the following error is shown:
form.reach_limit_of_creation%!(EXTRA int=0)

Since organizations are similar to users, that probably means that they have an internal repository limit as well which is incorrectly applied.

  • Gitea version (or commit ref): 1.14.5
  • Operating system: Debian Buster
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:
@MGChecker MGChecker changed the title Non-admins can not create repos for organizations bug: Non-admins can not create repos for organizations Aug 10, 2021
@noerw
Copy link
Member

noerw commented Aug 23, 2021

A discussion about this was started here #15924 (comment), but we had no concluding decision.

It's unclear what the best behaviour for this is, but I agree that it can be confusing.
Changing this is a major breaking change, unless we can come up with a mechanism that easily transitions instances that depend on this behaviour as it currently is.


A quick proposal: introduce a new instance-wide or per-user setting MAX_CREATION_LIMIT_ORGS, that

  • defaults to true, thus keeping current behaviour when unset
  • when false, ignores repo counter for creation of repos in orgs, and relies on the repo limit of the organization instead.

Gitea has enough config options already, so there should be enough people wanting this feature to justify adding this complexity..

@noerw noerw added issue/not-a-bug The reported issue is the intended behavior or the problem is not inside Gitea type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Aug 23, 2021
@MGChecker
Copy link
Author

I think this is unnecessarily complicated.

In contrast, I would propose not using the limit of the organization to check whether a repository may be created, but the limit of the user creating the repository at this moment. This is basically possible already by creating the repo in your own user namespace and then transfering it to the organization.

@noerw
Copy link
Member

noerw commented Aug 23, 2021

I would propose not using the limit of the organization to check whether a repository may be created, but the limit of the user creating the repository at this moment.

@MGChecker this is how it works currently. One of us is misunderstanding something here, not sure who 😅

@MGChecker
Copy link
Author

I agree that this is how it should work, but it does not in my setup.

Even though the user repository limit is larger than 0, they may still not create a repository inside the organization. The form is shown, but on submit the error message mentioned above is shown.

@MGChecker
Copy link
Author

I think this is a misunderstanding and this is actually a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/not-a-bug The reported issue is the intended behavior or the problem is not inside Gitea type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

2 participants