3593: Add explanatory comment about Workbench's user cache.
[arvados.git] / 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,