diff options
author | Michael Kozono <mkozono@gmail.com> | 2017-05-31 02:24:45 +0300 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2018-01-08 23:34:19 +0300 |
commit | 255a0f85e3b62845b58f5a4aa189e57f36992c77 (patch) | |
tree | 339d54b2cf3a9408fa3014ab84a2ad426f65cb3c /db | |
parent | ac86b2043dea8f15cb0670db98c2bf21e1843d4b (diff) |
Backport option to disable writing to `authorized_keys` file
Originally branch 'mk-toggle-writing-to-auth-keys-1631'
See merge request !2004
Squashed commits:
Add authorized_keys_enabled to Application Settings
Ensure default settings are exposed in UI
Without this change, `authorized_keys_enabled` is unchecked when it is nil, even if it should be checked by default.
Add “Speed up SSH operations” documentation
Clarify the reasons for disabling writes
Add "How to go back" section
Tweak copy
Update Application Setting screenshot
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170531180233_add_authorized_keys_enabled_to_application_settings.rb | 15 | ||||
-rw-r--r-- | db/schema.rb | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20170531180233_add_authorized_keys_enabled_to_application_settings.rb b/db/migrate/20170531180233_add_authorized_keys_enabled_to_application_settings.rb new file mode 100644 index 00000000000..fdae309946c --- /dev/null +++ b/db/migrate/20170531180233_add_authorized_keys_enabled_to_application_settings.rb @@ -0,0 +1,15 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddAuthorizedKeysEnabledToApplicationSettings < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + def change + # allow_null: true because we want to set the default based on if the + # instance is configured to use AuthorizedKeysCommand + add_column :application_settings, :authorized_keys_enabled, :boolean, allow_null: true + end +end diff --git a/db/schema.rb b/db/schema.rb index 740e80ccfd4..11273d2a82e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -154,6 +154,7 @@ ActiveRecord::Schema.define(version: 20171230123729) do t.integer "gitaly_timeout_default", default: 55, null: false t.integer "gitaly_timeout_medium", default: 30, null: false t.integer "gitaly_timeout_fast", default: 10, null: false + t.boolean "authorized_keys_enabled" end create_table "audit_events", force: :cascade do |t| |