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

User in Organisation has no repo limit but the user itself has a limit of 0: Cannot create repo in organisation #15504

Open
1 of 6 tasks
Commifreak opened this issue Apr 16, 2021 · 24 comments
Labels
type/bug type/enhancement An improvement of existing functionality

Comments

@Commifreak
Copy link

  • Gitea version (or commit ref): 1.14.1
  • Git version:
  • Operating system: Linux with your official docker image
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

Description

I have created an organisation with a team which users have admin rights there. The organisation Repo-Limit ist 10000. When a user with a repo-limit of 0 (the user itself!) want to create a repo in this organisation, gitea show up an error, that his limit is exceeded.

Is this a wanted behaviour?

Screenshots

grafik

The user admin page:

grafik
grafik

The organisation admin page:

grafik

@Commifreak
Copy link
Author

Can anyone confirm this "issue"?

@a1012112796
Copy link
Member

I see, It's a ui bug, should recheck limit when switch Owner

@Commifreak
Copy link
Author

Thanks for that! Is that change a candidate for the next release or does it need an explicit test by me?

@stale
Copy link

stale bot commented Jul 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the issue/stale label Jul 21, 2021
@Commifreak
Copy link
Author

Whats the current state?

@stale stale bot removed the issue/stale label Oct 18, 2021
@Commifreak
Copy link
Author

push

a1012112796 added a commit to a1012112796/gitea that referenced this issue May 18, 2022
fix go-gitea#15504

Signed-off-by: a1012112796 <1012112796@qq.com>
@blackshot
Copy link

blackshot commented Jun 16, 2022

i can confirm this bug running 1.16.8 docker image. actually i was looking for a fix.

why not adding this to 1.17.x milestone? this is a key feature to self hosted.

@lunny
Copy link
Member

lunny commented Jun 17, 2022

OK. Maybe we need another limitation. We already have these limitations.

  • The number which user could create around the instance, not only under his name
  • The number for an organization could create under the organization
  • The number which a user could create organization

So I think we may need another one.

  • The number which user could create in all his organization. That means we should change the meaning of the first limitation as the number which user could create under his name.

@blackshot
Copy link

OK. Maybe we need another limitation. We already have these limitations.

  • The number which user could create around the instance, not only under his name
  • The number for an organization could create under the organization
  • The number which a user could create organization

So I think we may need another one.

  • The number which user could create in all his organization. That means we should change the meaning of the first limitation as the number which user could create under his name.

I think it is easier to tackle this problem just defining MAX_USER_REPOS and MAX_ORG_REPOS. So if any user is creating a repo for himself validate MAX_USER_REPOS and if the user is creating a repo for some organization just validate MAX_ORG_REPOS

@gilbertoca
Copy link

gilbertoca commented Sep 26, 2022

I confirm this bug, running 1.16.9.
In my case, organization has -1 limit and user 20 limit. And the msg is always: You have already reached your limit of 2 repositories.
I've instructed the user to create the repo in your own profile and then transfer it to the organization.

@Commifreak
Copy link
Author

Anything new on that? I'd really see that fixed :/

@lunny
Copy link
Member

lunny commented Nov 10, 2022

-1 means derive from global configuration which is in your instance app.ini. -1 doesn't mean no limitation.

@gilbertoca
Copy link

gilbertoca commented Nov 10, 2022

-1 means derive from global configuration which is in your instance app.ini. -1 doesn't mean no limitation.

My setup:

[repository]
MAX_CREATION_LIMIT = 2
ROOT               = /opt/gitea/repositories

I've been using gitea since gitea-1.13.2, and MAX_CREATION_LIMIT have never effect to me - every new user I have to change the limit through the GUI.

@lunny lunny added issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail and removed type/bug labels Nov 11, 2022
@lunny
Copy link
Member

lunny commented Nov 11, 2022

-1 means derive from global configuration which is in your instance app.ini. -1 doesn't mean no limitation.

My setup:

[repository]
MAX_CREATION_LIMIT = 2
ROOT               = /opt/gitea/repositories

I've been using gitea since gitea-1.13.2, and MAX_CREATION_LIMIT have never effect to me - every new user I have to change the limit through the GUI.

It explains your problem. I don't think the definitions about -1 have been changed but maybe there are bugs in previous versions.

@Commifreak
Copy link
Author

@lunny Can you please bring up a new status of that issue? It dont see any connection between the config variables and the mentioned UI problem or did I missed something?

MAX_CREATION_LIMIT = 0 is still active and the limit for the org is higher, but users are still not able to create some repos.

@gilbertoca
Copy link

gilbertoca commented Nov 11, 2022

-1 means derive from global configuration which is in your instance app.ini. -1 doesn't mean no limitation.

@Commifreak and @lunny it always meant no limit

image

@Commifreak
Copy link
Author

I dont use -1 at all!

@lunny
Copy link
Member

lunny commented Nov 11, 2022

-1 means derive from global configuration which is in your instance app.ini. -1 doesn't mean no limitation.

@Commifreak and @lunny it always meant no limit

image

Ah, yes. They made some confusions. The configuration item MAX_CREATION_LIMIT = -1 means globally no limitation. But the value -1 in the UI of org or user setting in admin means deriving from global configuration. The two -1 have different concepts.

@gilbertoca
Copy link

gilbertoca commented Nov 11, 2022

@Commifreak and @lunny
Other confusion, that's what we have here, is that in GUI we have Maximum Number of Repositories for both user and org and MAX_CREATION_LIMIT.
One is the quantity you can HAVE e the other is the CREATION limit each one has. Or am I misunderstanding that?

@virtualdreams
Copy link

Same problem.
User = 0,
Organization = -1

User cannot create a repository for the organization.

But the above worked in gogs without problems.

@lunny lunny closed this as completed Mar 29, 2023
@wxiaoguang
Copy link
Contributor

Is it clearly resolved?

@lunny
Copy link
Member

lunny commented Mar 29, 2023

Closed by accident.

@lunny lunny reopened this Mar 29, 2023
@lunny lunny added type/bug type/enhancement An improvement of existing functionality and removed issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail labels Mar 29, 2023
@Commifreak
Copy link
Author

Commifreak commented May 11, 2023

Anything new?

Gitea 1.19.3, org limit 1000, user limit -1 (0): User cannot create repo in its org.

@gilbertoca So, you say both are different features? If that is true, it would be rather a feature request: Let org users create repos in it, even if the user have a repo limit (for personal repos).

Why?

We have public gitea instance with a public and private org. Users dont have rights to create OWN repos but they should create repos in the private org.

@gilbertoca
Copy link

@Commifreak and @lunny,

@gilbertoca So, you say both are different features?

I see different things here:
1 - can create repo (org or private) < MAX_CREATION_LIMIT;
2 - can have Maximum Number of Repositories - create by me or transferred to me.

But I may have misunderstood the meaning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants