Commit 97d74c2a authored by Pierre GUINOISEAU's avatar Pierre GUINOISEAU

Add configurable default for projects_limit

parent 335f9d64
...@@ -34,7 +34,7 @@ class Admin::UsersController < ApplicationController ...@@ -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 ...@@ -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: ...@@ -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
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"]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment