This commit is contained in:
rulingcom 2023-07-01 12:01:58 +08:00
parent fb650c6c9c
commit 278a89f57e
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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