Commit e535d217 authored by Vinnie Okada's avatar Vinnie Okada

Handle nil restricted visibility settings

Return `true` from `non_restricted_level?` when the
`restricted_visibility_levels` setting is nil.
parent 0eaabc27
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment