Sylvain Hellegouarch committed 8c570e9

Backport fix to get rid of thread_data. This may need to be documented for applications relying on the value being set. Instead they should now use request.user

Comments (0)

Files changed (1)


     def before_main(self):
         cherrypy.request.user = None
-        cherrypy.thread_data.user = None
         conf = cherrypy.config.get
         if ((not conf('session_authenticate_filter.on', False))
             login = cherrypy.session.get(session_key)
             cherrypy.session[session_key] = None
             cherrypy.request.user = None
-            cherrypy.thread_data.user = None
             if login and on_logout:
             from_page = cherrypy.request.params.get('from_page', '..')
         # Everything is OK: user is logged in
-        if load_user_by_username and not cherrypy.thread_data.user:
+        if load_user_by_username and not cherrypy.request.user:
             username = temp_user or cherrypy.session[session_key]
             cherrypy.request.user = load_user_by_username(username)
-            cherrypy.thread_data.user = cherrypy.request.user
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.