diff options
author | Alexis Reigel ( 🌴 may 2nd - may 9th 🌴 ) <mail@koffeinfrei.org> | 2018-05-02 11:08:16 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-05-02 11:08:16 +0300 |
commit | 9b33e3d36fcd46072b9fe83f1121fb0fd87c0fd7 (patch) | |
tree | 968009edb90046874d6c9d733239f77f42d19cdf /app/controllers/profiles/active_sessions_controller.rb | |
parent | d812ef0170ba2b482f096772d2307c64a7f6fc94 (diff) |
Display and revoke active sessions
Diffstat (limited to 'app/controllers/profiles/active_sessions_controller.rb')
-rw-r--r-- | app/controllers/profiles/active_sessions_controller.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/controllers/profiles/active_sessions_controller.rb b/app/controllers/profiles/active_sessions_controller.rb new file mode 100644 index 00000000000..f0cdc228366 --- /dev/null +++ b/app/controllers/profiles/active_sessions_controller.rb @@ -0,0 +1,14 @@ +class Profiles::ActiveSessionsController < Profiles::ApplicationController + def index + @sessions = ActiveSession.list(current_user) + end + + def destroy + ActiveSession.destroy(current_user, params[:id]) + + respond_to do |format| + format.html { redirect_to profile_active_sessions_url, status: 302 } + format.js { head :ok } + end + end +end |