Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2015-03-18 23:55:41 +0300
committerMarin Jankovski <maxlazio@gmail.com>2015-03-18 23:55:41 +0300
commit63f712948307723052589895d5bb993df03eafbd (patch)
treedd3cc2a76b9daab379130329baa4bb4c64e66692 /lib/gitlab/visibility_level.rb
parent50b6c66129a54e416e77a50aec4c2d271a2c17e7 (diff)
Move application setting to separate variable.
Diffstat (limited to 'lib/gitlab/visibility_level.rb')
-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