sidekiq的seesion

dev_daiao
cxt 5 years ago
parent d966552252
commit 6544a031a9

@ -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
Loading…
Cancel
Save