Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
cfee2fc9
Commit
cfee2fc9
authored
Jun 29, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1011 from peikk0/config_projects_limit
Add configurable default for projects_limit
parents
318350e3
97d74c2a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
2 deletions
+8
-2
app/controllers/admin/users_controller.rb
app/controllers/admin/users_controller.rb
+1
-1
app/models/user.rb
app/models/user.rb
+2
-1
config/gitlab.yml.example
config/gitlab.yml.example
+4
-0
config/initializers/00_before_all.rb
config/initializers/00_before_all.rb
+1
-0
No files found.
app/controllers/admin/users_controller.rb
View file @
cfee2fc9
...
@@ -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
...
...
app/models/user.rb
View file @
cfee2fc9
...
@@ -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
...
...
config/gitlab.yml.example
View file @
cfee2fc9
...
@@ -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
config/initializers/00_before_all.rb
View file @
cfee2fc9
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"
]
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