diff options
author | Marin Jankovski <maxlazio@gmail.com> | 2015-03-18 23:55:41 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-19 00:04:29 +0300 |
commit | 09657f1071571ca6a2ef7dd844e3e930dcb4a27e (patch) | |
tree | d969a1d7e87d33dd697d6d4880cb7ab50ad0eaa0 /lib | |
parent | 33d5a60571267ffa33fcb3e19f03f977e1a3f9c8 (diff) |
Move application setting to separate variable.
Diffstat (limited to 'lib')
-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 |