OTRS/otrs — pull request #145 by eliasp (2013-10-30 03:09:45+00:00)
Title: Re-use LDAP credentials for initial LDAP bind.

I disliked the approach of having to hardcode a `SearchUserDN`/`SearchUserPw` in `Kernel/Config.pm` for using LDAP as authentication backend and for syncing the LDAP user data to the DB.

This PR changes OTRS' behaviour to re-use by default the credentials of the logged in user for the initial LDAP bind, while still allowing an explicit anonymous bind by the newly introduced configuration variables:

$Self->{'AuthModule::LDAP::Anonymous'} = 1
$Self->{'AuthSyncModule::LDAP::Anonymous'} = 1

In case a hardcoded `SearchUserDN`/`SearchUserPw` is provided, OTRS behaves just as it always used to.