Handle nil restricted visibility settings
Return `true` from `non_restricted_level?` when the `restricted_visibility_levels` setting is nil.
This commit is contained in:
parent
0eaabc2708
commit
e535d21768
|
|
@ -35,7 +35,11 @@ module Gitlab
|
|||
end
|
||||
|
||||
def non_restricted_level?(level)
|
||||
! current_application_settings.restricted_visibility_levels.include?(level)
|
||||
if current_application_settings.restricted_visibility_levels.nil?
|
||||
true
|
||||
else
|
||||
! current_application_settings.restricted_visibility_levels.include?(level)
|
||||
end
|
||||
end
|
||||
|
||||
def valid_level?(level)
|
||||
|
|
|
|||
Loading…
Reference in New Issue