diff options
author | Robert Speicher <robert@gitlab.com> | 2017-07-27 17:41:40 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-07-27 17:41:40 +0000 |
commit | 86ae883b638d29953f26a87efc16ae613ff865e4 (patch) | |
tree | 6d216f1ec842e8cb72a9efac4ba576146aa176a5 /db | |
parent | 066f4d8b715aa6c58bffe39b7f9fb35e6e6ff8a9 (diff) | |
parent | f837cd6611a39d3dd38655821f32feb2c2abba8d (diff) | |
download | gitlab-ce-86ae883b638d29953f26a87efc16ae613ff865e4.tar.gz |
Merge branch 'backport-ee-2456' into 'master'
Skip OAuth authorization for trusted applications
See merge request !13061
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170717200542_add_trusted_column_to_oauth_applications.rb | 15 | ||||
-rw-r--r-- | db/schema.rb | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20170717200542_add_trusted_column_to_oauth_applications.rb b/db/migrate/20170717200542_add_trusted_column_to_oauth_applications.rb new file mode 100644 index 00000000000..1a013e6aefb --- /dev/null +++ b/db/migrate/20170717200542_add_trusted_column_to_oauth_applications.rb @@ -0,0 +1,15 @@ +class AddTrustedColumnToOauthApplications < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_column_with_default(:oauth_applications, :trusted, :boolean, default: false) + end + + def down + remove_column(:oauth_applications, :trusted) + end +end diff --git a/db/schema.rb b/db/schema.rb index 63030350c5d..93ab79e14e0 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1027,6 +1027,7 @@ ActiveRecord::Schema.define(version: 20170725145659) do t.datetime "updated_at" t.integer "owner_id" t.string "owner_type" + t.boolean "trusted", default: false, null: false end add_index "oauth_applications", ["owner_id", "owner_type"], name: "index_oauth_applications_on_owner_id_and_owner_type", using: :btree |