Work around quirk of CherryPy dispatching that causes username munging to not happen...
authorQuentin Smith <quentin@mit.edu>
Mon, 1 Feb 2010 04:45:01 +0000 (23:45 -0500)
committerQuentin Smith <quentin@mit.edu>
Mon, 1 Feb 2010 04:45:01 +0000 (23:45 -0500)
svn path=/trunk/packages/invirt-web/; revision=2979

code/main.py

index 7044167..0b8af46 100755 (executable)
@@ -97,6 +97,9 @@ class InvirtWeb(View):
         return d
 
     def __getattr__(self, name):
+        # At the point __getattr__ is called, tools haven't been run. Make sure the user is logged in.
+        cherrypy.tools.remote_user_login.callable()
+
         if name in ("admin", "overlord"):
             if not cherrypy.request.login in getAfsGroupMembers(config.adminacl, config.authz.afs.cells[0].cell):
                 raise InvalidInput('username', cherrypy.request.login,