-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Limit private repos #12787
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
Limit private repos #12787
Conversation
Apologies for the confusion and overhead by the way. 😄 |
A forcepush after a rebase would have done it too ... but here we are ;) |
@mvdkleijn can you commit the result of |
Which is exactly what I thought I did but that's the part where things went wrong. Anyway, it doesn't matter. I'm happier with this PR anyway. 😄 |
Signed-off-by: Martijn van der Kleijn <[email protected]>
users.max_public_repo_creation = Maximum Number of Public Repositories | ||
users.max_public_repo_creation_desc = (Enter -1 to use the global default limit.) | ||
users.max_private_repo_creation = Maximum Number of Private Repositories | ||
users.max_private_repo_creation_desc = (Enter -1 to use the global default limit.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose that means "this violates DRY" or some such? 😄
I have a question. The system currently keeps track of the number of repos that a user owns by storing it as a field in the DB. It causes a lot of code snippets all over the codebase. Was that done for performance reasons or otherwise? It feels like it could be a nice improvement in terms of maintenance to simply SELECT COUNT entries in the DB instead of storing the counts in the DB as a field. |
Yup it's an optimisation for performance reasons. |
Just checking in... my four year old gave me the gift of the flu. I'll continue on this in a few days. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
Replacement PR for #12705 since I done f-ed up that one.
Note: this turned out a little bigger than I had anticipated... as I stated before, I'm completely new to the Gitea codebase so I probably missed a lot.
Also, I didn't take a look at the tests yet. I did do some basic manual tests and as far as I can tell, the basic functionality is working.
Anyone who's willing to help test this, help fix tests and/or review it for missed parts or improvements, please comment. (I turned on "allow edits by maintainers" for this PR by the way)
Original description
Since @kasbah does not appear to have time to continue his work on PR #6184 I started looking at continuing his work. As there have been many changes to master since, I felt it was easier to start fresh.
Fixes #3653. Feedback very much appreciated.