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