Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
6f82a2937e2c
Commit
97d74c2a
authored
Jun 29, 2012
by
Pierre GUINOISEAU
Browse files
Add configurable default for projects_limit
parent
4ec9ef31b62b
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/controllers/admin/users_controller.rb
View file @
6f82a293
...
...
@@ -34,7 +34,7 @@ def team_update
def
new
@admin_user
=
User
.
new
(
:projects_limit
=>
10
)
@admin_user
=
User
.
new
(
:projects_limit
=>
GITLAB_OPTS
[
"default_projects_limit"
]
)
end
def
edit
...
...
app/models/user.rb
View file @
6f82a293
...
...
@@ -90,7 +90,8 @@ def self.find_for_ldap_auth(omniauth_info)
:name
=>
name
,
:email
=>
email
,
:password
=>
password
,
:password_confirmation
=>
password
:password_confirmation
=>
password
,
:projects_limit
=>
GITLAB_OPTS
[
"default_projects_limit"
]
)
end
end
...
...
config/gitlab.yml.example
View file @
6f82a293
...
...
@@ -27,3 +27,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
config/initializers/00_before_all.rb
View file @
6f82a293
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"
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment