Add configurable default for projects_limit
This commit is contained in:
parent
335f9d6410
commit
97d74c2adc
4 changed files with 8 additions and 2 deletions
|
@ -34,7 +34,7 @@ class Admin::UsersController < ApplicationController
|
||||||
|
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@admin_user = User.new(:projects_limit => 10)
|
@admin_user = User.new(:projects_limit => GITLAB_OPTS["default_projects_limit"])
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
|
|
|
@ -90,7 +90,8 @@ class User < ActiveRecord::Base
|
||||||
:name => name,
|
:name => name,
|
||||||
:email => email,
|
:email => email,
|
||||||
:password => password,
|
:password => password,
|
||||||
:password_confirmation => password
|
:password_confirmation => password,
|
||||||
|
:projects_limit => GITLAB_OPTS["default_projects_limit"]
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -27,3 +27,7 @@ git:
|
||||||
git_max_size: 5242880 # 5.megabytes
|
git_max_size: 5242880 # 5.megabytes
|
||||||
# Git timeout to read commit, in seconds
|
# Git timeout to read commit, in seconds
|
||||||
git_timeout: 10
|
git_timeout: 10
|
||||||
|
|
||||||
|
# Gitlab settings
|
||||||
|
gitlab:
|
||||||
|
default_projects_limit: 10
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
GIT_HOST = YAML.load_file("#{Rails.root}/config/gitlab.yml")["git_host"]
|
GIT_HOST = YAML.load_file("#{Rails.root}/config/gitlab.yml")["git_host"]
|
||||||
EMAIL_OPTS = YAML.load_file("#{Rails.root}/config/gitlab.yml")["email"]
|
EMAIL_OPTS = YAML.load_file("#{Rails.root}/config/gitlab.yml")["email"]
|
||||||
GIT_OPTS = YAML.load_file("#{Rails.root}/config/gitlab.yml")["git"]
|
GIT_OPTS = YAML.load_file("#{Rails.root}/config/gitlab.yml")["git"]
|
||||||
|
GITLAB_OPTS = YAML.load_file("#{Rails.root}/config/gitlab.yml")["gitlab"]
|
||||||
|
|
Loading…
Reference in a new issue