Index: /package_branches/invirt-web/cherrypy-rebased/code/main.fcgi
===================================================================
--- /package_branches/invirt-web/cherrypy-rebased/code/main.fcgi	(revision 2668)
+++ /package_branches/invirt-web/cherrypy-rebased/code/main.fcgi	(revision 2669)
@@ -20,5 +20,6 @@
     app = cherrypy.tree.mount(InvirtWeb(),
         '/' if dev else '/main.fcgi',
-        {'/':      {'tools.staticdir.root': static_dir},
+        {'/':      {'tools.staticdir.root': static_dir,
+                    'tools.invirtwebstate.on': True},
         '/static': {'tools.staticdir.on': True,
                     'tools.staticdir.dir': static_dir}
Index: /package_branches/invirt-web/cherrypy-rebased/code/main.py
===================================================================
--- /package_branches/invirt-web/cherrypy-rebased/code/main.py	(revision 2668)
+++ /package_branches/invirt-web/cherrypy-rebased/code/main.py	(revision 2669)
@@ -56,8 +56,8 @@
     @cherrypy.expose
     @cherrypy.tools.mako(filename="/list.mako")
-    def list(self, username):
+    def list(self):
         """Handler for list requests."""
         checkpoint.checkpoint('Getting list dict')
-        d = getListDict(username, state)
+        d = getListDict(cherrypy.request.login, cherrypy.request.state)
         checkpoint.checkpoint('Got list dict')
         return d
Index: /package_branches/invirt-web/cherrypy-rebased/code/view.py
===================================================================
--- /package_branches/invirt-web/cherrypy-rebased/code/view.py	(revision 2668)
+++ /package_branches/invirt-web/cherrypy-rebased/code/view.py	(revision 2669)
@@ -6,4 +6,6 @@
 import simplejson
 import datetime, decimal
+from invirt.config import structs as config
+from webcommon import State
 
 class MakoHandler(cherrypy.dispatch.LateParamPageHandler):
@@ -79,4 +81,10 @@
 cherrypy.tools.require_login = cherrypy.Tool('on_start_resource', require_login)
 
+def invirtwebstate_init():
+    """Initialize the cherrypy.request.state object from Invirt"""
+    cherrypy.request.state = State(cherrypy.request.login)
+
+cherrypy.tools.invirtwebstate = cherrypy.Tool('on_start_resource', invirtwebstate_init, priority=100)
+
 class View(object):
     _cp_config = {'tools.mako.directories': [os.path.join(os.path.dirname(__file__),'templates')]}
