Commit 63f71294 authored by Marin Jankovski's avatar Marin Jankovski

Move application setting to separate variable.

parent 50b6c661
......@@ -35,10 +35,12 @@ module Gitlab
end
def non_restricted_level?(level)
if current_application_settings.restricted_visibility_levels.nil?
restricted_levels = current_application_settings.restricted_visibility_levels
if restricted_levels.nil?
true
else
! current_application_settings.restricted_visibility_levels.include?(level)
!restricted_levels.include?(level)
end
end
......
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