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
b536acc9
Commit
b536acc9
authored
Apr 26, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3707 from Undev/default_project_settings
Default settings for project features
parents
748874a0
f5b549af
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
app/contexts/projects/create_context.rb
app/contexts/projects/create_context.rb
+5
-2
config/gitlab.yml.example
config/gitlab.yml.example
+7
-0
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+6
-0
No files found.
app/contexts/projects/create_context.rb
View file @
b536acc9
...
...
@@ -33,8 +33,11 @@ module Projects
end
# Disable less important features by default
@project
.
wall_enabled
=
false
@project
.
snippets_enabled
=
false
@project
.
issues_enabled
=
Gitlab
.
config
.
gitlab
.
default_projects_features
.
issues
@project
.
wiki_enabled
=
Gitlab
.
config
.
gitlab
.
default_projects_features
.
wiki
@project
.
wall_enabled
=
Gitlab
.
config
.
gitlab
.
default_projects_features
.
wall
@project
.
snippets_enabled
=
Gitlab
.
config
.
gitlab
.
default_projects_features
.
snippets
@project
.
merge_requests_enabled
=
Gitlab
.
config
.
gitlab
.
default_projects_features
.
merge_requests
@project
.
creator
=
current_user
...
...
config/gitlab.yml.example
View file @
b536acc9
...
...
@@ -37,6 +37,13 @@ production: &base
# signup_enabled: true # default: false - Account passwords are not sent via the email if signup is enabled.
# username_changing_enabled: false # default: true - User can change her username/namespace
## Default project features settings
default_projects_features:
issues: true
merge_requests: true
wiki: true
wall: false
snippets: false
## External issues trackers
issues_tracker:
...
...
config/initializers/1_settings.rb
View file @
b536acc9
...
...
@@ -60,6 +60,12 @@ Settings.gitlab['url'] ||= Settings.send(:build_gitlab_url)
Settings
.
gitlab
[
'user'
]
||=
'git'
Settings
.
gitlab
[
'signup_enabled'
]
||=
false
Settings
.
gitlab
[
'username_changing_enabled'
]
=
true
if
Settings
.
gitlab
[
'username_changing_enabled'
].
nil?
Settings
.
gitlab
[
'default_projects_features'
]
||=
{}
Settings
.
gitlab
.
default_projects_features
[
'issues'
]
=
true
if
Settings
.
gitlab
.
default_projects_features
[
'issues'
].
nil?
Settings
.
gitlab
.
default_projects_features
[
'merge_requests'
]
=
true
if
Settings
.
gitlab
.
default_projects_features
[
'merge_requests'
].
nil?
Settings
.
gitlab
.
default_projects_features
[
'wiki'
]
=
true
if
Settings
.
gitlab
.
default_projects_features
[
'wiki'
].
nil?
Settings
.
gitlab
.
default_projects_features
[
'wall'
]
=
false
if
Settings
.
gitlab
.
default_projects_features
[
'wall'
].
nil?
Settings
.
gitlab
.
default_projects_features
[
'snippets'
]
=
false
if
Settings
.
gitlab
.
default_projects_features
[
'snippets'
].
nil?
#
# Gravatar
...
...
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