Merge branch 'master' into 3634-tab-state
[arvados.git] / apps / workbench / app / controllers / sessions_controller.rb
1 class SessionsController < ApplicationController
2   skip_around_filter :require_thread_api_token, :only => [:destroy, :index]
3   skip_around_filter :set_thread_api_token, :only => [:destroy, :index]
4   skip_before_filter :find_object_by_uuid, :only => [:destroy, :index]
5
6   def destroy
7     session.clear
8     redirect_to arvados_api_client.arvados_logout_url(return_to: root_url)
9   end
10
11   def index
12     redirect_to root_url if session[:arvados_api_token]
13     render_index
14   end
15 end