Reduce oauth/authorizations monkey-patch size (#37615)
This commit is contained in:
parent
8ba87ef568
commit
1ae6b52c47
@ -20,14 +20,8 @@ class OAuth::AuthorizationsController < Doorkeeper::AuthorizationsController
|
|||||||
store_location_for(:user, request.url)
|
store_location_for(:user, request.url)
|
||||||
end
|
end
|
||||||
|
|
||||||
def render_success
|
def can_authorize_response?
|
||||||
if skip_authorization? || (matching_token? && !truthy_param?('force_login'))
|
!truthy_param?('force_login') && super
|
||||||
redirect_or_render authorize_response
|
|
||||||
elsif Doorkeeper.configuration.api_only
|
|
||||||
render json: pre_auth
|
|
||||||
else
|
|
||||||
render :new
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def truthy_param?(key)
|
def truthy_param?(key)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user