Issue #8 wontfix

Add the ablility to change password

Marcin Kałuża avatarMarcin Kałuża created an issue

Hi Regarding my previous message to you I attach a diff. It's just a draft, so it probably needs some more work (and some doc about permissions in ldap), but I just wanted to give an example. Tell me what you think of it.


Comments (2)

  1. Peter Sagerson

    For now, I don't think the authentication backend is actually an appropriate place for this. django.contrib.auth has a facility for changing a user's password, but it makes several assumptions: that the user is always capable of changing their password, that the password is changed via the user's model object, and that the password can be changed without providing the old password. All of these assumption as problematic for us. The second could be satisfied by using a proxy model class for User, but the first is dubious and the third is broken.

    I actually needed some account management for my own Django app with LDAP auth and I ended up writing a completely separate app for it. This app has to save the user's password in the session in order to perform the modify_s or passwd_s operation as the user in question. Until django.contrib.auth provides an interface to delegate password management to authentication plugins, I don't see anything sensible to do in the backend. We certainly can't do anything that will play nicely with the admin app, for example. For now, I'd recommend getting the user's DN from user.ldap_user.dn and making a few LDAP calls on your own.

  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.