summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2015-03-18 13:55:41 -0700
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-18 14:04:29 -0700
commit09657f1071571ca6a2ef7dd844e3e930dcb4a27e (patch)
treed969a1d7e87d33dd697d6d4880cb7ab50ad0eaa0 /lib
parent33d5a60571267ffa33fcb3e19f03f977e1a3f9c8 (diff)
downloadgitlab-ce-09657f1071571ca6a2ef7dd844e3e930dcb4a27e.tar.gz
Move application setting to separate variable.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/visibility_level.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/visibility_level.rb b/lib/gitlab/visibility_level.rb
index e4306bd2a56..582fc759efd 100644
--- a/lib/gitlab/visibility_level.rb
+++ b/lib/gitlab/visibility_level.rb
@@ -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