diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-03 12:07:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-03 12:07:33 +0300 |
commit | c0d8f9f3f962df6bfcc70440432da55d67307189 (patch) | |
tree | 457666705fbbd4f517d201680113406163829fcc /app/controllers/profiles | |
parent | 2cfa1fc75dd4bd6d1f70d5fee1a824410694f297 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/profiles')
-rw-r--r-- | app/controllers/profiles/active_sessions_controller.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/controllers/profiles/active_sessions_controller.rb b/app/controllers/profiles/active_sessions_controller.rb index c473023cacb..f409193aefc 100644 --- a/app/controllers/profiles/active_sessions_controller.rb +++ b/app/controllers/profiles/active_sessions_controller.rb @@ -4,4 +4,13 @@ class Profiles::ActiveSessionsController < Profiles::ApplicationController def index @sessions = ActiveSession.list(current_user).reject(&:is_impersonated) end + + def destroy + ActiveSession.destroy_with_public_id(current_user, params[:id]) + + respond_to do |format| + format.html { redirect_to profile_active_sessions_url, status: :found } + format.js { head :ok } + end + end end |