Skip to content
代码片段 群组 项目
提交 2d49068a 编辑于 作者: Furkan Ayhan's avatar Furkan Ayhan
浏览文件

Merge branch 'add_application_settings_toggle_for_user_identities' into 'master'

Add Pass User Identities entry to "User Preferences" table

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/108477



Merged-by: default avatarFurkan Ayhan <furkanayhn@gmail.com>
Approved-by: default avatarAndy Soiron <asoiron@gitlab.com>
Approved-by: default avatarAvielle Wolfe <awolfe@gitlab.com>
Approved-by: default avatarFurkan Ayhan <furkanayhn@gmail.com>
Approved-by: default avatarRohit Shambhuni <rshambhuni@gitlab.com>
Approved-by: default avatarAdam Hegyi <ahegyi@gitlab.com>
Reviewed-by: default avatarAndy Soiron <asoiron@gitlab.com>
Reviewed-by: default avatarJoe Snyder <joe.snyder@kitware.com>
Reviewed-by: default avatarFurkan Ayhan <furkanayhn@gmail.com>
Co-authored-by: default avatarJoseph Snyder <joe.snyder@kitware.com>
No related branches found
No related tags found
无相关合并请求
...@@ -24,6 +24,8 @@ class UserPreference < ApplicationRecord ...@@ -24,6 +24,8 @@ class UserPreference < ApplicationRecord
allow_blank: true allow_blank: true
validates :use_legacy_web_ide, allow_nil: false, inclusion: { in: [true, false] } validates :use_legacy_web_ide, allow_nil: false, inclusion: { in: [true, false] }
validates :pass_user_identities_to_ci_jwt, allow_nil: false, inclusion: { in: [true, false] }
validates :pinned_nav_items, json_schema: { filename: 'pinned_nav_items' } validates :pinned_nav_items, json_schema: { filename: 'pinned_nav_items' }
ignore_columns :experience_level, remove_with: '14.10', remove_after: '2021-03-22' ignore_columns :experience_level, remove_with: '14.10', remove_after: '2021-03-22'
......
# frozen_string_literal: true
class AddIdentityToggleToUserPreferences < Gitlab::Database::Migration[2.1]
enable_lock_retries!
def change
add_column :user_preferences, :pass_user_identities_to_ci_jwt, :boolean, default: false, null: false
end
end
3b7a512959c9d109ee4b454693ebfafed624869c82fa64d92b3f780165e91feb
\ No newline at end of file
...@@ -23373,6 +23373,7 @@ CREATE TABLE user_preferences ( ...@@ -23373,6 +23373,7 @@ CREATE TABLE user_preferences (
use_new_navigation boolean, use_new_navigation boolean,
achievements_enabled boolean DEFAULT true NOT NULL, achievements_enabled boolean DEFAULT true NOT NULL,
pinned_nav_items jsonb DEFAULT '{}'::jsonb NOT NULL, pinned_nav_items jsonb DEFAULT '{}'::jsonb NOT NULL,
pass_user_identities_to_ci_jwt boolean DEFAULT false NOT NULL,
CONSTRAINT check_89bf269f41 CHECK ((char_length(diffs_deletion_color) <= 7)), CONSTRAINT check_89bf269f41 CHECK ((char_length(diffs_deletion_color) <= 7)),
CONSTRAINT check_d07ccd35f7 CHECK ((char_length(diffs_addition_color) <= 7)) CONSTRAINT check_d07ccd35f7 CHECK ((char_length(diffs_addition_color) <= 7))
); );
...@@ -54,6 +54,13 @@ ...@@ -54,6 +54,13 @@
it { is_expected.not_to allow_value(nil).for(:use_legacy_web_ide) } it { is_expected.not_to allow_value(nil).for(:use_legacy_web_ide) }
it { is_expected.not_to allow_value("").for(:use_legacy_web_ide) } it { is_expected.not_to allow_value("").for(:use_legacy_web_ide) }
end end
describe 'pass_user_identities_to_ci_jwt' do
it { is_expected.to allow_value(true).for(:pass_user_identities_to_ci_jwt) }
it { is_expected.to allow_value(false).for(:pass_user_identities_to_ci_jwt) }
it { is_expected.not_to allow_value(nil).for(:pass_user_identities_to_ci_jwt) }
it { is_expected.not_to allow_value("").for(:pass_user_identities_to_ci_jwt) }
end
end end
describe 'notes filters global keys' do describe 'notes filters global keys' do
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册