From: Quentin Smith Date: Mon, 1 Feb 2010 04:45:01 +0000 (-0500) Subject: Work around quirk of CherryPy dispatching that causes username munging to not happen... X-Git-Tag: 0.1.7~8 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/e1fa27cf2da93f2a5bc18aa7a0c8169e4454368e?ds=sidebyside Work around quirk of CherryPy dispatching that causes username munging to not happen by the time dispatching happens svn path=/trunk/packages/invirt-web/; revision=2979 --- diff --git a/code/main.py b/code/main.py index 7044167..0b8af46 100755 --- a/code/main.py +++ b/code/main.py @@ -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,