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:
authorVinnie Okada <vincent@gitlab.com>2015-03-16 22:29:27 +0300
committerVinnie Okada <vincent@gitlab.com>2015-03-16 22:29:27 +0300
commit7c3c836d3b62c72d1adf5431c0fedc91d92a8907 (patch)
tree2feab437b70d11b7f41496735dbc0715e7d23768 /app/helpers/visibility_level_helper.rb
parentcba6d797d756e6cc3cf976610d5d21f55e6460b5 (diff)
Handle null restricted_visibility_levels setting
Fix a 500 error when the `restricted_visibility_levels` setting is null in the database.
Diffstat (limited to 'app/helpers/visibility_level_helper.rb')
-rw-r--r--app/helpers/visibility_level_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/visibility_level_helper.rb b/app/helpers/visibility_level_helper.rb
index 7c090dc594c..0d573e72a80 100644
--- a/app/helpers/visibility_level_helper.rb
+++ b/app/helpers/visibility_level_helper.rb
@@ -62,6 +62,6 @@ module VisibilityLevelHelper
def restricted_visibility_levels(show_all = false)
return [] if current_user.is_admin? && !show_all
- current_application_settings.restricted_visibility_levels
+ current_application_settings.restricted_visibility_levels || []
end
end