Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-07-27 22:03:35 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-27 22:03:56 +0300
commitd625f4e9fe78a69be0d481c20cba33b6dd88ef1a (patch)
tree510ee7d62fa2d6084a5058446cf61d328900325a /lib
parent9b60052467242bbc071bcb0f74b7437fb3dfc870 (diff)
Add latest changes from gitlab-org/security/gitlab@15-2-stable-ee
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/config/loader/yaml.rb2
-rw-r--r--lib/gitlab/visibility_level.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/config/loader/yaml.rb b/lib/gitlab/config/loader/yaml.rb
index 0559c85647d..7b87b5b8f97 100644
--- a/lib/gitlab/config/loader/yaml.rb
+++ b/lib/gitlab/config/loader/yaml.rb
@@ -41,8 +41,6 @@ module Gitlab
end
def too_big?
- return false unless Feature.enabled?(:ci_yaml_limit_size)
-
!deep_size.valid?
end
diff --git a/lib/gitlab/visibility_level.rb b/lib/gitlab/visibility_level.rb
index d378e558b8a..049e3befe64 100644
--- a/lib/gitlab/visibility_level.rb
+++ b/lib/gitlab/visibility_level.rb
@@ -18,6 +18,8 @@ module Gitlab
scope :public_to_user, -> (user = nil) do
where(visibility_level: VisibilityLevel.levels_for_user(user))
end
+
+ alias_method :visibility_level=, :visibility=
end
PRIVATE = 0 unless const_defined?(:PRIVATE)
@@ -108,10 +110,10 @@ module Gitlab
options.key(level.to_i) || s_('VisibilityLevel|Unknown')
end
- def level_value(level)
+ def level_value(level, fallback_value: PRIVATE)
return level.to_i if level.to_i.to_s == level.to_s && string_options.key(level.to_i)
- string_options[level] || PRIVATE
+ string_options[level] || fallback_value
end
def string_level(level)