Option to allow unlimited repositories for users. #2052

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Member

maxlazio commented Nov 23, 2012

Adds an option to remove the repositories limit for user projects. If enabled, user can create unlimited number of personal projects. By default this option is disabled.

This is a useful option for companies and universities where server resources are not a problem.
https://groups.google.com/d/msg/gitlabhq/ANAmyqP4m5U/ZqBGEWWVbhsJ

app/views/profile/show.html.haml
- .progress
- .bar{style: "width: #{current_user.projects_limit_percent}%;"}
-
+ - unless Gitlab.config.no_repo_limit?
@dzaporozhets

dzaporozhets Nov 23, 2012

Owner

padded should be out of %small

Owner

dzaporozhets commented Nov 23, 2012

Any reason why we can not increase limit to 1000 or something?
Less conditions and config -> more stable app and easy code

Owner

dosire commented Nov 23, 2012

@randx In case there is no limit we would like to remove messages about the limit from the interface to keep the interface clean. We considered using a magic number above which we would not show the messages but we though it would be better to be explicit about the intention of the code. Of course we are open to suggestions.

Owner

dosire commented Dec 2, 2012

@randx Maybe it is an option to not show the repo limit in the interface if the limit is still more than 100 repo's away? In that case we can just raise the limit to 1000 like you suggested.

Owner

dzaporozhets commented Dec 2, 2012

@dosire its a better option i think. In this case we have to add only 1 line of code

Owner

dosire commented Dec 2, 2012

@randx Great, thank you for your response.

@maxlazio Can you rewrite this PR to hide the limit when the limit is more than 100 repo's away.

Member

maxlazio commented Dec 4, 2012

@randx @dosire Done.

Owner

dosire commented Dec 4, 2012

@maxlazio Please squash the commits.

Sytse

On Tue, Dec 4, 2012 at 12:29 PM, Marin Jankovski
notifications@github.comwrote:

@randx https://github.com/randx @dosire https://github.com/dosireDone.


Reply to this email directly or view it on GitHubhttps://github.com/gitlabhq/gitlabhq/pull/2052#issuecomment-10993158.

app/views/dashboard/index.html.haml
- You can create up to
- = current_user.projects_limit
- projects. Click on button below to add a new one
+ - if current_user.projects_limit - current_user.my_own_projects.count < 100
@dzaporozhets

dzaporozhets Dec 4, 2012

Owner

move logic to account role please
Also link to new project should exist even if user has 1 or 1000 projects to create

app/views/profiles/show.html.haml
@@ -65,11 +65,13 @@
Personal projects:
%small.right
%span= current_user.my_own_projects.count
- of
- %span= current_user.projects_limit
+ - if current_user.projects_limit - current_user.my_own_projects.count < 100
@dzaporozhets

dzaporozhets Dec 4, 2012

Owner

same here. logic to role

Member

maxlazio commented Dec 4, 2012

@randx Implemented your recommendations.

Owner

dzaporozhets commented Dec 4, 2012

thank you. Looks good now. It will be merged after 4.0 released

@ghost ghost assigned maxlazio Feb 27, 2013

Owner

dosire commented Feb 27, 2013

@maxlazio Can you make this mergable again?

Owner

dosire commented Mar 16, 2013

@maxlazio Can you make this mergeable again?

@dosire dosire closed this Apr 3, 2013

rspeicher added a commit that referenced this pull request Jul 24, 2015

Merge branch 'migrate_session_expire_delay_unless_it_exists' into 'ma…
…ster'


Check if session_expire_delay column exists before adding the column.

Fixes #2052 

Fixes #1985

See merge request !1029
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment