Skip to content

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

Closed
wants to merge 7 commits into from
Closed

Conversation

mvdkleijn
Copy link

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.

@mvdkleijn
Copy link
Author

Apologies for the confusion and overhead by the way. 😄

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 10, 2020
@6543
Copy link
Member

6543 commented Sep 10, 2020

A forcepush after a rebase would have done it too ... but here we are ;)

@6543
Copy link
Member

6543 commented Sep 10, 2020

@mvdkleijn can you commit the result of make generate-swagger ?

@mvdkleijn
Copy link
Author

A forcepush after a rebase would have done it too ... but here we are ;)

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]>
@6543 6543 added this to the 1.14.0 milestone Sep 10, 2020
@6543 6543 added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Sep 10, 2020
Comment on lines +2016 to +2019
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.)
Copy link
Contributor

Choose a reason for hiding this comment

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

ack

Copy link
Author

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? 😄

@mvdkleijn
Copy link
Author

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.

@zeripath
Copy link
Contributor

Yup it's an optimisation for performance reasons.

@mvdkleijn
Copy link
Author

Just checking in... my four year old gave me the gift of the flu. I'll continue on this in a few days.

@stale
Copy link

stale bot commented Nov 15, 2020

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.

@stale stale bot added the issue/stale label Nov 15, 2020
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Nov 16, 2020
@stale stale bot removed the issue/stale label Nov 16, 2020
@lunny lunny modified the milestones: 1.14.0, 1.x.x Jan 27, 2021
@lunny lunny removed this from the 1.x.x milestone Jan 18, 2023
@mvdkleijn mvdkleijn deleted the limit-private-repos branch May 23, 2023 22:01
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Limit maximum count of private or public repositories for individual users
7 participants