1 class Oauth2ApplicationsController < Doorkeeper::ApplicationsController
4 prepend_before_action :authorize_web
5 before_action :set_locale
6 before_action :set_application, :only => [:show, :edit, :update, :destroy]
8 authorize_resource :class => false
11 @applications = current_resource_owner.oauth2_applications.ordered_by(:created_at)
17 @application = current_resource_owner&.oauth2_applications&.find(params[:id])
18 rescue ActiveRecord::RecordNotFound
19 render :action => "not_found", :status => :not_found
22 def application_params
23 params[:doorkeeper_application][:scopes]&.delete("")
24 params.require(:doorkeeper_application)
25 .permit(:name, :redirect_uri, :confidential, :scopes => [])
26 .merge(:owner => current_resource_owner)