diff options
author | Marin Jankovski <maxlazio@gmail.com> | 2015-03-18 23:55:41 +0300 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2015-03-18 23:55:41 +0300 |
commit | 63f712948307723052589895d5bb993df03eafbd (patch) | |
tree | dd3cc2a76b9daab379130329baa4bb4c64e66692 /lib/gitlab/visibility_level.rb | |
parent | 50b6c66129a54e416e77a50aec4c2d271a2c17e7 (diff) |
Move application setting to separate variable.
Diffstat (limited to 'lib/gitlab/visibility_level.rb')
-rw-r--r-- | lib/gitlab/visibility_level.rb | 6 |
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 |