diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/visibility_level_helper.rb | 2 | ||||
-rw-r--r-- | app/views/shared/_visibility_radios.html.haml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/visibility_level_helper.rb b/app/helpers/visibility_level_helper.rb index ecc554f85d0..c8401b784f6 100644 --- a/app/helpers/visibility_level_helper.rb +++ b/app/helpers/visibility_level_helper.rb @@ -95,7 +95,7 @@ module VisibilityLevelHelper :default_group_visibility, to: :current_application_settings - def skip_level?(form_model, level) + def disallowed_visibility_level?(form_model, level) return false unless form_model.respond_to?(:visibility_level_allowed?) !form_model.visibility_level_allowed?(level) end diff --git a/app/views/shared/_visibility_radios.html.haml b/app/views/shared/_visibility_radios.html.haml index 182c4eebd50..7b9453943d1 100644 --- a/app/views/shared/_visibility_radios.html.haml +++ b/app/views/shared/_visibility_radios.html.haml @@ -1,5 +1,5 @@ - Gitlab::VisibilityLevel.values.each do |level| - - next if skip_level?(form_model, level) + - next if disallowed_visibility_level?(form_model, level) .radio - restricted = restricted_visibility_levels.include?(level) = form.label "#{model_method}_#{level}" do |