sidekiq的seesion

dev_daiao
cxt 5 years ago
parent d966552252
commit 6544a031a9

@ -1,7 +1,7 @@
class AdminConstraint class AdminConstraint
def matches?(request) def matches?(request)
return false unless request.session[:"#{default_yun_session}"] return false unless request.session[:newweb_user_id]
user = User.find request.session[:"#{default_yun_session}"] user = User.find request.session[:newweb_user_id]
user && user.admin? user && user.admin?
end end
end end
Loading…
Cancel
Save