diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-06 21:12:45 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-06 21:12:45 +0000 |
commit | 8ec004d6d8d92f00d0598e94ede4d31ab1e8f18e (patch) | |
tree | 525dcb81832e5ad142cc1f2aeff2f38c51f80aa4 /app/models | |
parent | e22c3819ad2321a0cf825877fe3b60e41268c5b3 (diff) | |
download | gitlab-ce-8ec004d6d8d92f00d0598e94ede4d31ab1e8f18e.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/application_setting.rb | 4 | ||||
-rw-r--r-- | app/models/application_setting_implementation.rb | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index 7219374fe2a..0f33b0541dc 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -423,6 +423,10 @@ class ApplicationSetting < MainClusterwide::ApplicationRecord allow_nil: false, inclusion: { in: [true, false], message: N_('must be a boolean value') } + validates :deny_all_requests_except_allowed, + allow_nil: false, + inclusion: { in: [true, false], message: N_('must be a boolean value') } + Gitlab::SSHPublicKey.supported_types.each do |type| validates :"#{type}_key_restriction", presence: true, key_restriction: { type: type } end diff --git a/app/models/application_setting_implementation.rb b/app/models/application_setting_implementation.rb index 4e2ec0d4ecd..a8ffa70a797 100644 --- a/app/models/application_setting_implementation.rb +++ b/app/models/application_setting_implementation.rb @@ -60,6 +60,7 @@ module ApplicationSettingImplementation default_project_visibility: Settings.gitlab.default_projects_features['visibility_level'], default_projects_limit: Settings.gitlab['default_projects_limit'], default_snippet_visibility: Settings.gitlab.default_projects_features['visibility_level'], + deny_all_requests_except_allowed: false, diff_max_patch_bytes: Gitlab::Git::Diff::DEFAULT_MAX_PATCH_BYTES, diff_max_files: Commit::DEFAULT_MAX_DIFF_FILES_SETTING, diff_max_lines: Commit::DEFAULT_MAX_DIFF_LINES_SETTING, |