2018-09-23 19:44:14 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-05-02 08:08:16 +00:00
|
|
|
class Profiles::ActiveSessionsController < Profiles::ApplicationController
|
|
|
|
def index
|
2019-02-23 18:18:44 +00:00
|
|
|
@sessions = ActiveSession.list(current_user).reject(&:is_impersonated)
|
2018-05-02 08:08:16 +00:00
|
|
|
end
|
2020-01-03 09:07:33 +00:00
|
|
|
|
|
|
|
def destroy
|
|
|
|
ActiveSession.destroy_with_public_id(current_user, params[:id])
|
2020-09-02 15:10:54 +00:00
|
|
|
current_user.forget_me!
|
2020-01-03 09:07:33 +00:00
|
|
|
|
|
|
|
respond_to do |format|
|
|
|
|
format.html { redirect_to profile_active_sessions_url, status: :found }
|
|
|
|
format.js { head :ok }
|
|
|
|
end
|
|
|
|
end
|
2018-05-02 08:08:16 +00:00
|
|
|
end
|