diff options
author | Tuomo Ala-Vannesluoma <tuomoav@gmail.com> | 2018-10-05 13:41:11 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-10-05 13:41:11 +0000 |
commit | c84b60b1645950a30fdbc37c9065a200dc750d90 (patch) | |
tree | 76d523f37481fa1422f63e96e2a1777d48060b9c /db | |
parent | c972f2e459a6b45852a3d4e76566cdf772a6764a (diff) | |
download | gitlab-ce-c84b60b1645950a30fdbc37c9065a200dc750d90.tar.gz |
Make GitLab pages support access control
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20180423204600_add_pages_access_level_to_project_feature.rb | 16 | ||||
-rw-r--r-- | db/schema.rb | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20180423204600_add_pages_access_level_to_project_feature.rb b/db/migrate/20180423204600_add_pages_access_level_to_project_feature.rb new file mode 100644 index 00000000000..1d2f8cf9c76 --- /dev/null +++ b/db/migrate/20180423204600_add_pages_access_level_to_project_feature.rb @@ -0,0 +1,16 @@ +class AddPagesAccessLevelToProjectFeature < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + disable_ddl_transaction! + + DOWNTIME = false + + def up + add_column_with_default(:project_features, :pages_access_level, :integer, default: ProjectFeature::PUBLIC, allow_null: false) + + change_column_default(:project_features, :pages_access_level, ProjectFeature::ENABLED) + end + + def down + remove_column :project_features, :pages_access_level + end +end diff --git a/db/schema.rb b/db/schema.rb index b3d4badaf82..7d78756c16f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1578,6 +1578,7 @@ ActiveRecord::Schema.define(version: 20180924141949) do t.datetime "created_at" t.datetime "updated_at" t.integer "repository_access_level", default: 20, null: false + t.integer "pages_access_level", default: 20, null: false end add_index "project_features", ["project_id"], name: "index_project_features_on_project_id", unique: true, using: :btree |