diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 15:44:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 15:44:42 +0000 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /app/helpers/namespaces_helper.rb | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) | |
download | gitlab-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.rb | 11 |
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') |