summaryrefslogtreecommitdiff
path: root/app/helpers/namespaces_helper.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 15:44:42 +0000
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /app/helpers/namespaces_helper.rb
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
downloadgitlab-ce-4555e1b21c365ed8303ffb7a3325d773c9b8bf31.tar.gz
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'app/helpers/namespaces_helper.rb')
-rw-r--r--app/helpers/namespaces_helper.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/helpers/namespaces_helper.rb b/app/helpers/namespaces_helper.rb
index a4521541bf9..39a8f506ba2 100644
--- a/app/helpers/namespaces_helper.rb
+++ b/app/helpers/namespaces_helper.rb
@@ -83,6 +83,15 @@ module NamespacesHelper
}
end
+ def cascading_namespace_setting_locked?(attribute, group, **args)
+ return false if group.nil?
+
+ method_name = "#{attribute}_locked?"
+ return false unless group.namespace_settings.respond_to?(method_name)
+
+ group.namespace_settings.public_send(method_name, **args) # rubocop:disable GitlabSecurity/PublicSend
+ end
+
private
# Many importers create a temporary Group, so use the real
@@ -116,4 +125,4 @@ module NamespacesHelper
end
end
-NamespacesHelper.prepend_if_ee('EE::NamespacesHelper')
+NamespacesHelper.prepend_mod_with('NamespacesHelper')