Commit d51618b9a1ca72e294a264739764a5d7d3727ac3
1 parent
75fbdc40
Exists in
master
and in
4 other branches
New settings added to enable or disable project features by default
Conflicts: config/gitlab.yml.example config/initializers/1_settings.rb
Showing
2 changed files
with
13 additions
and
0 deletions
Show diff stats
config/gitlab.yml.example
@@ -37,6 +37,13 @@ production: &base | @@ -37,6 +37,13 @@ production: &base | ||
37 | # signup_enabled: true # default: false - Account passwords are not sent via the email if signup is enabled. | 37 | # signup_enabled: true # default: false - Account passwords are not sent via the email if signup is enabled. |
38 | # username_changing_enabled: false # default: true - User can change her username/namespace | 38 | # username_changing_enabled: false # default: true - User can change her username/namespace |
39 | 39 | ||
40 | + ## Default project features settings | ||
41 | + default_projects_features: | ||
42 | + issues: true | ||
43 | + merge_requests: true | ||
44 | + wiki: true | ||
45 | + wall: true | ||
46 | + snippets: true | ||
40 | 47 | ||
41 | ## External issues trackers | 48 | ## External issues trackers |
42 | issues_tracker: | 49 | issues_tracker: |
config/initializers/1_settings.rb
@@ -60,6 +60,12 @@ Settings.gitlab['url'] ||= Settings.send(:build_gitlab_url) | @@ -60,6 +60,12 @@ Settings.gitlab['url'] ||= Settings.send(:build_gitlab_url) | ||
60 | Settings.gitlab['user'] ||= 'git' | 60 | Settings.gitlab['user'] ||= 'git' |
61 | Settings.gitlab['signup_enabled'] ||= false | 61 | Settings.gitlab['signup_enabled'] ||= false |
62 | Settings.gitlab['username_changing_enabled'] = true if Settings.gitlab['username_changing_enabled'].nil? | 62 | Settings.gitlab['username_changing_enabled'] = true if Settings.gitlab['username_changing_enabled'].nil? |
63 | +Settings.gitlab['default_projects_features'] ||= {} | ||
64 | +Settings.gitlab.default_projects_features['issues'] = true if Settings.gitlab.default_projects_features['issues'].nil? | ||
65 | +Settings.gitlab.default_projects_features['merge_requests'] = true if Settings.gitlab.default_projects_features['merge_requests'].nil? | ||
66 | +Settings.gitlab.default_projects_features['wiki'] = true if Settings.gitlab.default_projects_features['wiki'].nil? | ||
67 | +Settings.gitlab.default_projects_features['wall'] = true if Settings.gitlab.default_projects_features['wall'].nil? | ||
68 | +Settings.gitlab.default_projects_features['snippets'] = true if Settings.gitlab.default_projects_features['snippets'].nil? | ||
63 | 69 | ||
64 | # | 70 | # |
65 | # Gravatar | 71 | # Gravatar |