3593: Add explanatory comment about Workbench's user cache.
authorBrett Smith <brett@curoverse.com>
Mon, 18 Aug 2014 18:38:57 +0000 (14:38 -0400)
committerBrett Smith <brett@curoverse.com>
Mon, 18 Aug 2014 21:25:42 +0000 (17:25 -0400)
Refs #3593.

apps/workbench/app/controllers/application_controller.rb

index b62636166c1081c6528f0a0e29cdb7ff2b824ef2..5b9d41e94ecd8ff12b3a591e4a29ca1079dd656b 100644 (file)
@@ -436,6 +436,10 @@ class ApplicationController < ActionController::Base
       false  # We may redirect to login, or not, based on the current action.
     else
       session[:arvados_api_token] = params[:api_token]
+      # If we later have trouble contacting the API server, we still want
+      # to be able to render basic user information in the UI--see
+      # render_exception above.  We store that in the session here.  This is
+      # not intended to be used as a general-purpose cache.  See #2891.
       session[:user] = {
         uuid: user.uuid,
         email: user.email,