Popup closes on submit
[arvados.git] / apps / workbench / app / controllers / sessions_controller.rb
1 class SessionsController < ApplicationController
2   skip_around_filter :thread_with_mandatory_api_token, :only => [:destroy, :index]
3   skip_around_filter :thread_with_optional_api_token, :only => [:destroy, :index]
4   skip_before_filter :find_object_by_uuid, :only => [:destroy, :index]
5   def destroy
6     session.clear
7     redirect_to $arvados_api_client.arvados_logout_url(return_to: root_url)
8   end
9   def index
10     redirect_to root_url if session[:arvados_api_token]
11   end
12 end