Ignore:
Timestamp:
Sep 27, 2009, 7:55:09 PM (15 years ago)
Author:
quentin
Message:

Implement administrator mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package_branches/invirt-web/cherrypy/code/view.py

    r2422 r2482  
    113113def invirtwebstate_init():
    114114    """Initialize the cherrypy.request.state object from Invirt"""
    115     cherrypy.request.state = State(cherrypy.request.login)
     115    if not hasattr(cherrypy.request, "state"):
     116        cherrypy.request.state = State(cherrypy.request.login)
    116117
    117118cherrypy.tools.invirtwebstate = cherrypy.Tool('on_start_resource', invirtwebstate_init, priority=100)
Note: See TracChangeset for help on using the changeset viewer.