mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
fixed oauth2 管理员配置
This commit is contained in:
@@ -20,7 +20,7 @@ Doorkeeper.configure do
|
||||
access_token_generator '::Doorkeeper::JWT'
|
||||
|
||||
admin_authenticator do
|
||||
user = current_user || User.find_by_id(session[:www_user_id])
|
||||
user = User.current || User.find_by_id(session[:www_user_id])
|
||||
unless user && user.admin_or_business?
|
||||
redirect_to root_url
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user