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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
97d74c2a
Commit
97d74c2a
authored
Jun 29, 2012
by
Pierre GUINOISEAU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add configurable default for projects_limit
parent
335f9d64
Changes
4
Show 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 @
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
...
...
app/models/user.rb
View file @
97d74c2a
...
@@ -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 @
97d74c2a
...
@@ -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
config/initializers/00_before_all.rb
View file @
97d74c2a
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