Merge branch 'master' into 14075-uploadfiles
[arvados.git] / apps / workbench / app / controllers / sessions_controller.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class SessionsController < ApplicationController
6   skip_around_filter :require_thread_api_token, :only => [:destroy, :logged_out]
7   skip_around_filter :set_thread_api_token, :only => [:destroy, :logged_out]
8   skip_before_filter :find_object_by_uuid
9   skip_before_filter :find_objects_for_index
10   skip_before_filter :ensure_arvados_api_exists
11
12   def destroy
13     session.clear
14     redirect_to arvados_api_client.arvados_logout_url(return_to: root_url)
15   end
16
17   def logged_out
18     redirect_to root_url if session[:arvados_api_token]
19     render_index
20   end
21
22   def index
23   end
24 end