@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
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: