Merge branch '8784-dir-listings'
[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, :index]
7   skip_around_filter :set_thread_api_token, :only => [:destroy, :index]
8   skip_before_filter :find_object_by_uuid, :only => [:destroy, :index]
9
10   def destroy
11     session.clear
12     redirect_to arvados_api_client.arvados_logout_url(return_to: root_url)
13   end
14
15   def index
16     redirect_to root_url if session[:arvados_api_token]
17     render_index
18   end
19 end