Commit cfee2fc9 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #1011 from peikk0/config_projects_limit

Add configurable default for projects_limit
parents 318350e3 97d74c2a
...@@ -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
......
...@@ -31,3 +31,7 @@ git: ...@@ -31,3 +31,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