Greetings, Background, we're getting ready to deploy Trac on Ubuntu 8.10, python 2.5, and sqlite. Currently Ubuntu debs are at trac 0.11.0, though I did most of my testing on 0.11.2(yeah, I found out later Ubuntu was behind) Anyways where using Apache and NIS to provide authentication and want to make sure that name and email address gets set without users having to visit preferences and manually set it. I wrote some code to query AD via python-ldap libraries and then update session_attribute table. I don't need to update name and email all that often as it is pretty static, so I thought when trac writes to the session table(promote_session) would be a good time to call my code.
As I understand things, please correct me if I'm wrong(I'm new to python and trac). As an anonymous user Trac creates a session id and stores it in a cookie(trac_form_token), and no where else. When a user authenticates, a new value is created for trac_auth and stored in a cookie, written to auth_cookie table and promote_session is called to write the user as authenticated to the session table. So my thoughts where to modify session.py to to call my code from promote_session. Yes it's ugly, this was just to get things done so we could deploy. Then after my python/trac skills where better I'd make it more elegant to survive upgrades and not touch core code if possible. So my questions are is promote_session a good place to do this from or should I do it elsewhere? I thought about doing it at login, but not sure we need to update this information all that often. Users will have to be authenticated to create tickets, so we want to make sure we have their email address filled in from the start. If promote session is a good place, then under what circumstances does promote_session get called? Or better yet, can someone articulate how trac handles sessions? Thanks, Matt P. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
