X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/77238c2233002aa1e8256d2eda37ff65dcd5c916..46eb68a8b8105d0746e28fe0d2a4309a01a040d9:/code/main.py diff --git a/code/main.py b/code/main.py index 0a9342a..17bbd62 100755 --- a/code/main.py +++ b/code/main.py @@ -55,12 +55,12 @@ class InvirtWeb(View): @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 templates.list(searchList=[d]) + return d index=list @cherrypy.expose @@ -690,21 +690,6 @@ def show_error(op, username, fields, err, emsg, traceback): d['details'] = details return templates.error(searchList=[d]) -def getUser(environ): - """Return the current user based on the SSL environment variables""" - user = environ.get('REMOTE_USER') - if user is None: - return - - if environ.get('AUTH_TYPE') == 'Negotiate': - # Convert the krb5 principal into a krb4 username - if not user.endswith('@%s' % config.kerberos.realm): - return - else: - return user.split('@')[0].replace('/', '.') - else: - return user - def handler(username, state, path, fields): operation, path = pathSplit(path) if not operation: