diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-05-20 21:05:18 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-05-20 21:05:18 +0000 |
commit | 983b592cb7cbf3369e1af9e26f527876c6cca360 (patch) | |
tree | 92fb6587739d35ec09ad36dd7ecac3bb30e84d9e /db | |
parent | a97cb8f8b81defc2fac460aefa41d3522f388b18 (diff) | |
parent | 260a915cb0aa163bd282557b5584ed368cd9983a (diff) | |
download | gitlab-ce-983b592cb7cbf3369e1af9e26f527876c6cca360.tar.gz |
Merge branch 'issue_14632' into 'master'
Fix group visibility level migration in case all visibility levels are restricted
fixes #14632
See merge request !4107
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb b/db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb index 75de5f70fa2..72b862d67d2 100644 --- a/db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb +++ b/db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb @@ -7,7 +7,9 @@ class AddDefaultGroupVisibilityToApplicationSettings < ActiveRecord::Migration add_column :application_settings, :default_group_visibility, :integer # Unfortunately, this can't be a `default`, since we don't want the configuration specific # `allowed_visibility_level` to end up in schema.rb - execute("UPDATE application_settings SET default_group_visibility = #{allowed_visibility_level}") + + visibility_level = allowed_visibility_level || Gitlab::VisibilityLevel::PRIVATE + execute("UPDATE application_settings SET default_group_visibility = #{visibility_level}") end def down |