summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-03-10 15:56:59 +0000
committerDouwe Maan <douwe@gitlab.com>2017-03-10 15:56:59 +0000
commitc17f260473717e1e8b436eae3314527e654e0bb8 (patch)
tree436d3101eee5ca8710864b9e2cc855dca8857f74
parent6ade63977a744ad361281ebeaa18271305a0192f (diff)
parent16475bede74c21998502b77ae58397a43cf2d288 (diff)
downloadgitlab-ce-c17f260473717e1e8b436eae3314527e654e0bb8.tar.gz
Merge branch 'enable-snippets-by-default' into 'master'
Enable snippets for new projects by default Closes #28192 See merge request !9857
-rw-r--r--changelogs/unreleased/enable-snippets-by-default.yml4
-rw-r--r--config/gitlab.yml.example2
-rw-r--r--config/initializers/1_settings.rb2
3 files changed, 6 insertions, 2 deletions
diff --git a/changelogs/unreleased/enable-snippets-by-default.yml b/changelogs/unreleased/enable-snippets-by-default.yml
new file mode 100644
index 00000000000..04fa3f7bdae
--- /dev/null
+++ b/changelogs/unreleased/enable-snippets-by-default.yml
@@ -0,0 +1,4 @@
+---
+title: Enable snippets for new projects by default
+merge_request:
+author:
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index b4f6cba1833..2bc39ea3f65 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -89,7 +89,7 @@ production: &base
issues: true
merge_requests: true
wiki: true
- snippets: false
+ snippets: true
builds: true
container_registry: true
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index b45d0e23080..d049ae9476f 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -221,7 +221,7 @@ Settings.gitlab['session_expire_delay'] ||= 10080
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['snippets'] = false if Settings.gitlab.default_projects_features['snippets'].nil?
+Settings.gitlab.default_projects_features['snippets'] = true if Settings.gitlab.default_projects_features['snippets'].nil?
Settings.gitlab.default_projects_features['builds'] = true if Settings.gitlab.default_projects_features['builds'].nil?
Settings.gitlab.default_projects_features['container_registry'] = true if Settings.gitlab.default_projects_features['container_registry'].nil?
Settings.gitlab.default_projects_features['visibility_level'] = Settings.send(:verify_constant, Gitlab::VisibilityLevel, Settings.gitlab.default_projects_features['visibility_level'], Gitlab::VisibilityLevel::PRIVATE)