Merge pull request #1011 from peikk0/config_projects_limit

Add configurable default for projects_limit
This commit is contained in:
Dmitriy Zaporozhets 2012-06-29 04:23:25 -07:00
commit cfee2fc9e4
4 changed files with 8 additions and 2 deletions

View file

@ -34,7 +34,7 @@ class Admin::UsersController < ApplicationController
def new
@admin_user = User.new(:projects_limit => 10)
@admin_user = User.new(:projects_limit => GITLAB_OPTS["default_projects_limit"])
end
def edit

View file

@ -90,7 +90,8 @@ class User < ActiveRecord::Base
:name => name,
:email => email,
:password => password,
:password_confirmation => password
:password_confirmation => password,
:projects_limit => GITLAB_OPTS["default_projects_limit"]
)
end
end

View file

@ -31,3 +31,7 @@ git:
git_max_size: 5242880 # 5.megabytes
# Git timeout to read commit, in seconds
git_timeout: 10
# Gitlab settings
gitlab:
default_projects_limit: 10

View file

@ -1,3 +1,4 @@
GIT_HOST = YAML.load_file("#{Rails.root}/config/gitlab.yml")["git_host"]
EMAIL_OPTS = YAML.load_file("#{Rails.root}/config/gitlab.yml")["email"]
GIT_OPTS = YAML.load_file("#{Rails.root}/config/gitlab.yml")["git"]
GITLAB_OPTS = YAML.load_file("#{Rails.root}/config/gitlab.yml")["gitlab"]