19129: Select specific fields to speed up dashboard loading
[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_action :require_thread_api_token, :only => [:destroy, :logged_out]
7   skip_around_action :set_thread_api_token, :only => [:destroy, :logged_out]
8   skip_before_action :find_object_by_uuid
9   skip_before_action :find_objects_for_index, raise: false
10   skip_before_action :ensure_arvados_api_exists
11
12   def destroy
13     token = session[:arvados_api_token]
14     session.clear
15     redirect_to arvados_api_client.arvados_logout_url(return_to: root_url, api_token: token)
16   end
17
18   def logged_out
19     redirect_to root_url if session[:arvados_api_token]
20     render_index
21   end
22
23   def index
24   end
25 end