diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-07-16 00:46:29 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-07-20 15:38:21 +0300 |
commit | 4d69cb9d9460f9805bfc1f34ca3a600f54804167 (patch) | |
tree | d252ca69044d640cdc4d5253a00552ec5e90d5cc /db | |
parent | a920bf3834e870dbc1afabb043c962d26a9c9664 (diff) |
Allow to disable user request access to groups/projects
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20160715154212_add_request_access_enabled_to_projects.rb | 12 | ||||
-rw-r--r-- | db/migrate/20160715204316_add_request_access_enabled_to_groups.rb | 12 | ||||
-rw-r--r-- | db/schema.rb | 12 |
3 files changed, 31 insertions, 5 deletions
diff --git a/db/migrate/20160715154212_add_request_access_enabled_to_projects.rb b/db/migrate/20160715154212_add_request_access_enabled_to_projects.rb new file mode 100644 index 00000000000..bf0131c6d76 --- /dev/null +++ b/db/migrate/20160715154212_add_request_access_enabled_to_projects.rb @@ -0,0 +1,12 @@ +class AddRequestAccessEnabledToProjects < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + disable_ddl_transaction! + + def up + add_column_with_default :projects, :request_access_enabled, :boolean, default: true + end + + def down + remove_column :projects, :request_access_enabled + end +end diff --git a/db/migrate/20160715204316_add_request_access_enabled_to_groups.rb b/db/migrate/20160715204316_add_request_access_enabled_to_groups.rb new file mode 100644 index 00000000000..e7b14cd3ee2 --- /dev/null +++ b/db/migrate/20160715204316_add_request_access_enabled_to_groups.rb @@ -0,0 +1,12 @@ +class AddRequestAccessEnabledToGroups < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + disable_ddl_transaction! + + def up + add_column_with_default :namespaces, :request_access_enabled, :boolean, default: true + end + + def down + remove_column :namespaces, :request_access_enabled + end +end diff --git a/db/schema.rb b/db/schema.rb index ebf31ded369..72780fb8d03 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -664,16 +664,17 @@ ActiveRecord::Schema.define(version: 20160718153603) do add_index "milestones", ["title"], name: "index_milestones_on_title_trigram", using: :gin, opclasses: {"title"=>"gin_trgm_ops"} create_table "namespaces", force: :cascade do |t| - t.string "name", null: false - t.string "path", null: false + t.string "name", null: false + t.string "path", null: false t.integer "owner_id" t.datetime "created_at" t.datetime "updated_at" t.string "type" - t.string "description", default: "", null: false + t.string "description", default: "", null: false t.string "avatar" - t.boolean "share_with_group_lock", default: false - t.integer "visibility_level", default: 20, null: false + t.boolean "share_with_group_lock", default: false + t.integer "visibility_level", default: 20, null: false + t.boolean "request_access_enabled", default: true, null: false end add_index "namespaces", ["created_at", "id"], name: "index_namespaces_on_created_at_and_id", using: :btree @@ -843,6 +844,7 @@ ActiveRecord::Schema.define(version: 20160718153603) do t.boolean "has_external_issue_tracker" t.string "repository_storage", default: "default", null: false t.boolean "has_external_wiki" + t.boolean "request_access_enabled", default: true, null: false end add_index "projects", ["builds_enabled", "shared_runners_enabled"], name: "index_projects_on_builds_enabled_and_shared_runners_enabled", using: :btree |