gitlab-org--gitlab-foss/app/controllers/profiles/u2f_registrations_controller.rb
Timothy Andrew 16c44a5ddd Allow naming U2F devices.
1. Display a list of U2F devices on the `two_factor_auth` page.

2. Allow deleting individual U2F devices.

3. Allow setting a (optional) name for a device (during registration).
2016-08-18 22:12:02 +05:30

7 lines
291 B
Ruby

class Profiles::U2fRegistrationsController < Profiles::ApplicationController
def destroy
u2f_registration = current_user.u2f_registrations.find(params[:id])
u2f_registration.destroy
redirect_to profile_two_factor_auth_path, notice: "Successfully deleted U2F device."
end
end