Merge remote-tracking branch 'upstream/pull/3300'
This commit is contained in:
commit
5966acc207
12 changed files with 170 additions and 80 deletions
|
@ -395,4 +395,10 @@ class ApplicationController < ActionController::Base
|
|||
|
||||
referer.to_s
|
||||
end
|
||||
|
||||
def scope_enabled?(scope)
|
||||
doorkeeper_token&.includes_scope?(scope) || current_token&.includes_scope?(scope)
|
||||
end
|
||||
|
||||
helper_method :scope_enabled?
|
||||
end
|
||||
|
|
|
@ -20,8 +20,8 @@ class Oauth2ApplicationsController < Doorkeeper::ApplicationsController
|
|||
end
|
||||
|
||||
def application_params
|
||||
params[:doorkeeper_application][:scopes]&.delete("")
|
||||
params.require(:doorkeeper_application)
|
||||
params[:oauth2_application][:scopes]&.delete("")
|
||||
params.require(:oauth2_application)
|
||||
.permit(:name, :redirect_uri, :confidential, :scopes => [])
|
||||
.merge(:owner => current_resource_owner)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue