debian-mirror-gitlab/app/controllers/oauth/authorized_applications_controller.rb

18 lines
560 B
Ruby
Raw Normal View History

2015-04-26 12:48:37 +05:30
class Oauth::AuthorizedApplicationsController < Doorkeeper::AuthorizedApplicationsController
2015-09-11 14:41:01 +05:30
include PageLayoutHelper
layout 'profile'
2015-04-26 12:48:37 +05:30
def destroy
2015-09-11 14:41:01 +05:30
if params[:token_id].present?
current_resource_owner.oauth_authorized_tokens.find(params[:token_id]).revoke
else
Doorkeeper::AccessToken.revoke_all_for(params[:id], current_resource_owner)
end
2017-09-10 17:25:29 +05:30
redirect_to applications_profile_url,
status: 302,
notice: I18n.t(:notice, scope: [:doorkeeper, :flash, :authorized_applications, :destroy])
2015-04-26 12:48:37 +05:30
end
end