diff --git a/app/controllers/admin/box_controller.rb b/app/controllers/admin/box_controller.rb index 2043397..d1c2884 100644 --- a/app/controllers/admin/box_controller.rb +++ b/app/controllers/admin/box_controller.rb @@ -28,7 +28,7 @@ class Admin::BoxController < ApplicationController private def check_login user = current_user - if user.nil? || user.is_admin? + if user.nil? || !user.is_admin? return render :file => "#{Rails.root}/app/views/errors/404.html", :layout => false, :status => :not_found, :formats => [:html] end end diff --git a/app/controllers/admin/plow_controller.rb b/app/controllers/admin/plow_controller.rb index 18b11ab..1447109 100644 --- a/app/controllers/admin/plow_controller.rb +++ b/app/controllers/admin/plow_controller.rb @@ -60,7 +60,7 @@ class Admin::PlowController < ApplicationController private def check_login user = current_user - if user.nil? || user.is_admin? + if user.nil? || !user.is_admin? return render :file => "#{Rails.root}/app/views/errors/404.html", :layout => false, :status => :not_found, :formats => [:html] end end