fixed oauth2 管理员配置

This commit is contained in:
xiaoxiaoqiong 2022-07-06 10:35:32 +08:00
parent eb0bda81e9
commit d1d7ae5b7f
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ Doorkeeper.configure do
access_token_generator '::Doorkeeper::JWT'
admin_authenticator do
user = User.current || User.find_by_id(session[:www_user_id])
user = User.find_by_id(session[:www_user_id])
unless user && user.admin_or_business?
redirect_to root_url
end