= Autofill authenticated user's session settings from Active Directory = == Description == This patch adds functionality to retrieve email and name from an Active Directory server for a logged in user if their either their 'Name' and/or 'Email' session settings are blank. Looks for [session] trac.ini flags to enable/disable each. Dependencies: * [http://sourceforge.net/projects/pywin32/ pywin32] * [http://tgolden.sc.sabren.com/python/active_directory.html active_directory] * Trac 0.11dev-r5883 or newer (might work with lower revs, but this is what I tested on); == Bugs/Feature Requests == Existing bugs and feature requests for LdapSessionSettingsPatch are [report:9?COMPONENT=LdapSessionSettingsPatch here]. If you have any issues, create a [http://trac-hacks.org/newticket?component=LdapSessionSettingsPatch&owner=gt4329b new ticket]. == Download == Download the zipped source from [download:ldapsessionsettingspatch here]. == Source == You can check out LdapSessionSettingsPatch from [http://trac-hacks.org/svn/ldapsessionsettingspatch here] using Subversion, or [source:ldapsessionsettingspatch browse the source] with Trac. == Example == * install the required modules: [http://sourceforge.net/projects/pywin32/ pywin32] and [http://tgolden.sc.sabren.com/python/active_directory.html active_directory] * Apply the file patch session_patch.diff to your existing /trac/web/session.py (or just copy (and rename) the provided session_full.py over your existing /trac/web/session.py -- BUT BACKUP YOUR ORIGINAL FIRST!!) * Modify your trac.ini file: {{{ [session] ## this setting indicates that if the user hasn't filled ## in a name on their 'Preferences' page, go try and ## grab it from the LDAP/AD server (the 'displayName' user property) ## defaults: ## get_name_from_ldap_if_empty = false ## get_name_from_ldap_userattribute = displayName get_name_from_ldap_if_empty = true get_name_from_ldap_userattribute = displayName ## this setting indicates that if the user hasn't filled ## in an email on their 'Preferences' page, go try and ## grab it from the LDAP/AD server (the 'mail' user property) ## defaults: ## get_email_from_ldap_if_empty = false ## get_email_from_ldap_userattribute = mail get_email_from_ldap_if_empty = true get_email_from_ldap_userattribute = mail }}} == Recent Changes == [[ChangeLog(ldapsessionsettingspatch, 3)]] == Author/Contributors == '''Author:''' [wiki:gt4329b] [[BR]] '''Contributors:'''