Commit 09657f10 authored by Marin Jankovski's avatar Marin Jankovski Committed by Dmitriy Zaporozhets

Move application setting to separate variable.

parent 33d5a605
......@@ -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