diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 7ad6ce1de..0d778dd67 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -57,7 +57,8 @@ class ApplicationController < ActionController::Base end def redirect_unless_admin - unless AppConfig[:admins].include?(current_user.username) + admins = AppConfig[:admins] + unless admins.present? && admins.include?(current_user.username) redirect_to root_url end end diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb deleted file mode 100644 index 01847eef4..000000000 --- a/spec/controllers/application_controller_spec.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'spec_helper' - -describe ApplicationController do -end