Commit b536acc9 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #3707 from Undev/default_project_settings

Default settings for project features
parents 748874a0 f5b549af
......@@ -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
......
......@@ -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:
......
......@@ -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
......
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