From 6544a031a967b6b601961cec964c37e880dc8efd Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 9 Dec 2019 10:46:06 +0800 Subject: [PATCH] =?UTF-8?q?sidekiq=E7=9A=84seesion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/constraint/admin_constraint.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/constraint/admin_constraint.rb b/app/constraint/admin_constraint.rb index 429c5bf02..e48f1ad8f 100644 --- a/app/constraint/admin_constraint.rb +++ b/app/constraint/admin_constraint.rb @@ -1,7 +1,7 @@ class AdminConstraint def matches?(request) - return false unless request.session[:"#{default_yun_session}"] - user = User.find request.session[:"#{default_yun_session}"] + return false unless request.session[:newweb_user_id] + user = User.find request.session[:newweb_user_id] user && user.admin? end end \ No newline at end of file