﻿ticket	summary	type	release	owner	status	created	modified	_description	_reporter
11303	[Patch] req.remote_user is not always set	defect		Carlos López Pérez	new	2013-09-05T10:15:24+02:00	2022-02-27T14:52:41+01:00	"Hi,

I played around with this plugin a bit because it didn't seem to do anything.

Apparently, {{{req.remote_user}}} isn't (always?) set, so I modified it to use {{{req.authname}}} instead. It now works for me, but I don't know if this is a correct solution.

The attached patch contains this change as well as:

 * messages and HTML template (of 0.12 branch) translated into English (sorry, not proper l10n, I just updated the hardcoded strings);
 * it retrieves displayName instead of cn to get the name (this should really be configurable, I suppose);
 * it now supports non-ascii characters in names;
 * some code typos were fixed;
 * I added some debug logging."	Andras Korn
3314	Ignoring userdn and binding for password changing	enhancement	0.10	Carlos López Pérez	new	2008-07-02T20:04:02+02:00	2020-05-17T22:27:17+02:00	"I made a fix in the Trac 0.10 version of the plugin to correctly compose a dn when the userdn setting is not used (i.e. it is empty). For the password operation to succeed without configuring LdapPlugin to bind to a specific user it also necessary to bind with the old password of the user. Below is my amateur patch. 

{{{
--- accountldap/accountldap.py  2008-05-29 10:09:00.000000000 +0200
+++ accountldap.mod/accountldap.py      2008-07-02 19:39:52.000000000 +0200
@@ -66,11 +66,16 @@
             return template, None
         #dn = 'uid=%s,%s,%s' % (req.authname, self.userdn, self.basedn)
         try:
-            base = self.userdn + ',' + self.basedn
+            base = self.basedn
+
+            if self.userdn != '':
+                base = self.userdn + ',' + base
+
             ld_results = self.ldap.search_s(base, ldap.SCOPE_SUBTREE, 'uid=%s' % req.authname, ['dn'])
             # FIXME: Use only the first found DN. We should only have single DN here
             if ld_results :
                 dn = ld_results[0][0]
+                self.ldap.simple_bind(dn, old)
                 self.ldap.passwd_s(dn, old, p1)
             else :
                 raise LDAPError('Failed to find user in LDAP')
}}}"	memfis
11521	"Skipping ""AccountLDAPPlugin = accountldap"":"	defect	1.0	Carlos López Pérez	new	2014-01-22T19:47:53+01:00	2014-01-24T01:13:58+01:00	"Hi,

I am unable to load Trac web browser and I see the below logs : Can you please help me understand on what the main issue could be as am newbie to Trac.
{{{#!pycon
Trac[loader] ERROR: Skipping ""AccountLDAPPlugin = accountldap"":
Traceback (most recent call last):
  File ""build/bdist.linux-x86_64/egg/trac/loader.py"", line 68, in _load_eggs
    entry.load(require=True)
  File ""/usr/local/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py"", line 2087, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File ""build/bdist.cygwin-1.7.20-i686/egg/accountldap/__init__.py"", line 8, in <module>
  File ""build/bdist.cygwin-1.7.20-i686/egg/accountldap/accountldap.py"", line 9, in <module>
  File ""/usr/local/lib/python2.7/ldap.py"", line 14, in <module>
    from salt.exceptions import CommandExecutionError, SaltInvocationError
  File ""/usr/local/lib/python2.7/salt/__init__.py"", line 13, in <module>
    import salt.log
  File ""/usr/local/lib/python2.7/salt/salt/__init__.py"", line 19, in <module>
    from salt.utils import migrations
  File ""/usr/local/lib/python2.7/salt/utils/__init__.py"", line 26, in <module>
    import zmq
ImportError: No module named zmq

Trac[loader] DEBUG: Loading HudsonTrac from /db_apps/git/plugins/HudsonTrac-0.5-py2.7.egg
2014-01-17 15:05:46,167 Trac[loader] DEBUG: Loading HudsonTrac from /db_apps/git/plugins/HudsonTrac-0.5-py2.7.egg
2014-01-17 15:05:46,167 Trac[loader] DEBUG: Loading HudsonTrac from /db_apps/git/plugins/HudsonTrac-0.5-py2.7.egg
2014-01-17 15:05:46,170 Trac[loader] DEBUG: Loading STractistics from /db_apps/git/plugins/STractistics-0.5.0b-py2.7.egg
2014-01-17 15:05:46,170 Trac[loader] DEBUG: Loading STractistics from /db_apps/git/plugins/STractistics-0.5.0b-py2.7.egg
2014-01-17 15:05:46,170 Trac[loader] DEBUG: Loading STractistics from /db_apps/git/plugins/STractistics-0.5.0b-py2.7.egg
2014-01-17 15:05:46,171 Trac[loader] DEBUG: Loading TracXMLRPC from /db_apps/git/plugins/TracXMLRPC-1.1.2-py2.7.egg
2014-01-17 15:05:46,171 Trac[loader] DEBUG: Loading TracXMLRPC from /db_apps/git/plugins/TracXMLRPC-1.1.2-py2.7.egg
2014-01-17 15:05:46,171 Trac[loader] DEBUG: Loading TracXMLRPC from /db_apps/git/plugins/TracXMLRPC-1.1.2-py2.7.egg
}}}"	anonymous
3171	[Patch] English translation	enhancement	0.12	Carlos López Pérez	new	2008-06-12T02:40:36+02:00	2013-09-05T10:22:28+02:00	"I have checked out the code from SVN and translated it to English. I also tried to get a feel on when the plugin is called and how to test it, as it doesn't seem to be pulling the information from the database at my server, but could not understand much.

Attached is the 0.12 folder. Sorry for the hidden files, I've coded it in a Mac."	Rafael Fonseca
