Merge pull request #3707 from Undev/default_project_settings
Default settings for project features
This commit is contained in:
commit
b536acc92a
3 changed files with 18 additions and 2 deletions
|
@ -33,8 +33,11 @@ module Projects
|
||||||
end
|
end
|
||||||
|
|
||||||
# Disable less important features by default
|
# Disable less important features by default
|
||||||
@project.wall_enabled = false
|
@project.issues_enabled = Gitlab.config.gitlab.default_projects_features.issues
|
||||||
@project.snippets_enabled = false
|
@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
|
@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.
|
# 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
|
# 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
|
## External issues trackers
|
||||||
issues_tracker:
|
issues_tracker:
|
||||||
|
|
|
@ -60,6 +60,12 @@ Settings.gitlab['url'] ||= Settings.send(:build_gitlab_url)
|
||||||
Settings.gitlab['user'] ||= 'git'
|
Settings.gitlab['user'] ||= 'git'
|
||||||
Settings.gitlab['signup_enabled'] ||= false
|
Settings.gitlab['signup_enabled'] ||= false
|
||||||
Settings.gitlab['username_changing_enabled'] = true if Settings.gitlab['username_changing_enabled'].nil?
|
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
|
# Gravatar
|
||||||
|
|
Loading…
Reference in a new issue