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
diff options
context:
space:
mode:
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')