diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-05-19 21:05:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-19 21:05:08 +0200 |
commit | 8378b72ebacc51e5e090faa527462b801e4c2803 (patch) | |
tree | 92deefbf0e199119a486055ac18774d5a5b410f0 /app/controllers/oauth/authorized_applications_controller.rb | |
parent | 5910eb9b61da6eacf6b534d831da6e2f698e2703 (diff) |
Ensure push subscription is immediately removed when application is revoked (#7548)
* Ensure push subscription is immediately removed when application is revoked * When token is revoked from app, unsubscribe too
Diffstat (limited to 'app/controllers/oauth/authorized_applications_controller.rb')
-rw-r--r-- | app/controllers/oauth/authorized_applications_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/oauth/authorized_applications_controller.rb b/app/controllers/oauth/authorized_applications_controller.rb index 395fbc51b..0c28d194b 100644 --- a/app/controllers/oauth/authorized_applications_controller.rb +++ b/app/controllers/oauth/authorized_applications_controller.rb @@ -8,6 +8,11 @@ class Oauth::AuthorizedApplicationsController < Doorkeeper::AuthorizedApplicatio include Localized + def destroy + Web::PushSubscription.unsubscribe_for(params[:id], current_resource_owner) + super + end + private def store_current_location |