From 278a89f57e401ac914c0b3b58975b3110b24b799 Mon Sep 17 00:00:00 2001 From: rulingcom Date: Sat, 1 Jul 2023 12:01:58 +0800 Subject: [PATCH] fix --- app/controllers/admin/box_controller.rb | 2 +- app/controllers/admin/plow_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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