On 08/12/2009 11:17 AM, stupidgeek wrote: > Hi all, > > I'm having a strange problem. I wrote a basic LDAP backend, to > authenticate users against our open directory server: > > [snip] >
> Note that the print user line works, so a valid user is being > returned, meaning the bind works just fine. > > The problem I am getting is that the GET /admin/ is returning me to > the login form, without any errors, over and over. A login using a > user from the django db works without a problem. > > Any suggestions? > > Hi Brenton, Your GET /admin/ is returning "without any errors". By that, do you mean that it is sending you back to the login form and telling you to input a *correct* username and password? If so, the thing I ran into with this is that the django.contrib.auth.models.User model has two attributes, is_staff and is_superuser. If you are NOT setting at least is_staff = True, then your user is not allowed to access the admin, period, and you'll never get past the login screen. If you go into /admin/ as an actual admin user, you'll likely see your user created in the Users section, but with no staff or superuser permissions. I actually very recently wrote an app to help with this sort of thing, http://code.google.com/p/django-ldap-groups/, though I haven't targeted Open Directory or LDAP servers using SASL auth. I'd be happy to work with you to add Open Directory to the list of supported servers. It is very new (about a week old or so), and has boogs, but I'd love to see if it helps your problem. (Of course, the fun part about LDAP is that my diagnosis may be entirely wrong, too... ;) Regards, ---Peter Herndon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

