Changeset 2397 for package_branches/invirt-web/cherrypy/code/main.py
- Timestamp:
- Aug 9, 2009, 6:45:27 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
package_branches/invirt-web/cherrypy/code/main.py
r2396 r2397 691 691 return templates.error(searchList=[d]) 692 692 693 def getUser(environ):694 """Return the current user based on the SSL environment variables"""695 user = environ.get('REMOTE_USER')696 if user is None:697 return698 699 if environ.get('AUTH_TYPE') == 'Negotiate':700 # Convert the krb5 principal into a krb4 username701 if not user.endswith('@%s' % config.kerberos.realm):702 return703 else:704 return user.split('@')[0].replace('/', '.')705 else:706 return user707 708 693 def handler(username, state, path, fields): 709 694 operation, path = pathSplit(path)
Note: See TracChangeset
for help on using the changeset viewer.