Merge branch 'master' into glitch-soc/merge-upstream

Conflicts:
	app/controllers/oauth/authorizations_controller.rb

Just two changes being too close to one another.
Took both.
This commit is contained in:
Thibaut Girka
2018-09-11 16:51:26 +02:00
27 changed files with 506 additions and 148 deletions

View File

@ -18,4 +18,18 @@ class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController
def set_pack
use_pack 'auth'
end
def render_success
if skip_authorization? || (matching_token? && !truthy_param?('force_login'))
redirect_or_render authorize_response
elsif Doorkeeper.configuration.api_only
render json: pre_auth
else
render :new
end
end
def truthy_param?(key)
ActiveModel::Type::Boolean.new.cast(params[key])
end
end