jlaine/django-ldapdb — pull request #15 by mgorny (2013-09-11 08:34:56+00:00)
Title: Support binding models to different credentials

Long story short, this allows you to do something like:

bounduser = LdapUser.bind_as(alias='somerandomid', username='foouser', password='foopassword')
with bounduser.objects.get(username='foouser') as u:
u.something = 'something'
u.save()

while keeping the 'global' LDAP credentials anonymous. We're going to use this to perform LDAP changes using the password user provided for authentication.