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,8 +35,12 @@ module Gitlab
end
def non_restricted_level?(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)
options.has_value?(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