summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-07-08 08:29:18 +0000
committerRémy Coutable <remy@rymai.me>2016-07-08 08:29:18 +0000
commit2c650b6f30d2e76cf632d6ce5771859aed67ac48 (patch)
tree58112a7439cc49392052ab43ab29821435a509fe /db
parent5d0b06a038a205f52f73f4cfd2947799f12698d0 (diff)
parenta0a9494e4e6db3cfcdecae0a7e9c2877432fa30b (diff)
downloadgitlab-ce-2c650b6f30d2e76cf632d6ce5771859aed67ac48.tar.gz
Merge branch 'feature/option-set-new-users-external' into 'master'
Added setting to set new users by default as external ## What does this MR do? This implements the feature request #14508. It adds an option in the application settings to set new users by default as external. ## Are there points in the code the reviewer needs to double check? Everything. Like I mentioned in the discussion of the issue my knowledge of Ruby basically doesn't exists. I tested it on my machine and it seems to work, but as I am very unexperienced in Ruby I highly recommend to take a close look at the code. ## Why was this MR needed? It was requested by @DouweM to work on the issue with the proposed changes by me. ## What are the relevant issue numbers? This MR is for the issue #14508 that followed up after the implementation of #4009. See merge request !4545
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160608211215_add_user_default_external_to_application_settings.rb13
-rw-r--r--db/schema.rb1
2 files changed, 14 insertions, 0 deletions
diff --git a/db/migrate/20160608211215_add_user_default_external_to_application_settings.rb b/db/migrate/20160608211215_add_user_default_external_to_application_settings.rb
new file mode 100644
index 00000000000..34c702e3fa6
--- /dev/null
+++ b/db/migrate/20160608211215_add_user_default_external_to_application_settings.rb
@@ -0,0 +1,13 @@
+class AddUserDefaultExternalToApplicationSettings < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+ disable_ddl_transaction!
+
+ def up
+ add_column_with_default(:application_settings, :user_default_external, :boolean,
+ default: false, allow_null: false)
+ end
+
+ def down
+ remove_column(:application_settings, :user_default_external)
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 68b9425253c..a5eea3a697c 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -84,6 +84,7 @@ ActiveRecord::Schema.define(version: 20160705163108) do
t.string "health_check_access_token"
t.boolean "send_user_confirmation_email", default: false
t.integer "container_registry_token_expire_delay", default: 5
+ t.boolean "user_default_external", default: false, null: false
t.text "after_sign_up_text"
t.string "repository_storage", default: "default"
t.string "enabled_git_access_protocol"