fixed oauth2 管理员配置
This commit is contained in:
parent
eb0bda81e9
commit
d1d7ae5b7f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue