authorized_applications_controller.rb 579 B

1234567891011121314151617181920212223242526
  1. # frozen_string_literal: true
  2. class Oauth::AuthorizedApplicationsController < Doorkeeper::AuthorizedApplicationsController
  3. skip_before_action :authenticate_resource_owner!
  4. before_action :store_current_location
  5. before_action :authenticate_resource_owner!
  6. before_action :set_body_classes
  7. include Localized
  8. def destroy
  9. Web::PushSubscription.unsubscribe_for(params[:id], current_resource_owner)
  10. super
  11. end
  12. private
  13. def set_body_classes
  14. @body_classes = 'admin'
  15. end
  16. def store_current_location
  17. store_location_for(:user, request.url)
  18. end
  19. end