debian-mirror-gitlab/app/controllers/profiles/u2f_registrations_controller.rb
2021-01-30 21:13:32 +05:30

11 lines
395 B
Ruby

# frozen_string_literal: true
class Profiles::U2fRegistrationsController < Profiles::ApplicationController
feature_category :authentication_and_authorization
def destroy
u2f_registration = current_user.u2f_registrations.find(params[:id])
u2f_registration.destroy
redirect_to profile_two_factor_auth_path, status: :found, notice: _("Successfully deleted U2F device.")
end
end