diff options
author | Valery Sizov <valery@gitlab.com> | 2015-09-17 10:46:01 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2015-09-17 10:46:01 +0300 |
commit | 2e9a7032cec02588484eb162717298d311770c7d (patch) | |
tree | 8e047cfa969b70946779fd8f7936bfdf1f6758c0 | |
parent | 6cbc20512cd8f062f4a6745b839c5f2921ac6d63 (diff) | |
parent | ce4defaf2f9195df4680823d8c9f0f49bbced21b (diff) |
Merge branch 'enable_ssl_by_default' into 'master'
Enable SSL by default
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/1135
See merge request !1299
-rw-r--r-- | app/models/hooks/web_hook.rb | 2 | ||||
-rw-r--r-- | db/migrate/20150915001905_enable_ssl_verification_by_default.rb | 5 | ||||
-rw-r--r-- | db/migrate/20150916000405_enable_ssl_verification_for_web_hooks.rb | 8 | ||||
-rw-r--r-- | db/schema.rb | 5 |
4 files changed, 16 insertions, 4 deletions
diff --git a/app/models/hooks/web_hook.rb b/app/models/hooks/web_hook.rb index 9a8251bdad5..a078accbdbd 100644 --- a/app/models/hooks/web_hook.rb +++ b/app/models/hooks/web_hook.rb @@ -25,7 +25,7 @@ class WebHook < ActiveRecord::Base default_value_for :note_events, false default_value_for :merge_requests_events, false default_value_for :tag_push_events, false - default_value_for :enable_ssl_verification, false + default_value_for :enable_ssl_verification, true # HTTParty timeout default_timeout Gitlab.config.gitlab.webhook_timeout diff --git a/db/migrate/20150915001905_enable_ssl_verification_by_default.rb b/db/migrate/20150915001905_enable_ssl_verification_by_default.rb new file mode 100644 index 00000000000..6e924262a13 --- /dev/null +++ b/db/migrate/20150915001905_enable_ssl_verification_by_default.rb @@ -0,0 +1,5 @@ +class EnableSslVerificationByDefault < ActiveRecord::Migration + def change + change_column :web_hooks, :enable_ssl_verification, :boolean, default: true + end +end diff --git a/db/migrate/20150916000405_enable_ssl_verification_for_web_hooks.rb b/db/migrate/20150916000405_enable_ssl_verification_for_web_hooks.rb new file mode 100644 index 00000000000..90ce6c2db3d --- /dev/null +++ b/db/migrate/20150916000405_enable_ssl_verification_for_web_hooks.rb @@ -0,0 +1,8 @@ +class EnableSslVerificationForWebHooks < ActiveRecord::Migration + def up + execute("UPDATE web_hooks SET enable_ssl_verification = true") + end + + def down + end +end diff --git a/db/schema.rb b/db/schema.rb index 48314b8db6a..a3a69a4b626 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,8 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20150916145038) do - +ActiveRecord::Schema.define(version: 20150916000405) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -782,7 +781,7 @@ ActiveRecord::Schema.define(version: 20150916145038) do t.boolean "merge_requests_events", default: false, null: false t.boolean "tag_push_events", default: false t.boolean "note_events", default: false, null: false - t.boolean "enable_ssl_verification", default: false + t.boolean "enable_ssl_verification", default: true end add_index "web_hooks", ["created_at", "id"], name: "index_web_hooks_on_created_at_and_id", using: :btree |