Hi Piter,
This was a straight-up bug in the interaction between AUTHORIZE_ALL_USERS and USER_SEARCH (as opposed to USER_DN_TEMPLATE). Fixed in version 1.2.5.
Thanks,
Peter
> On Jan 30, 2015, at 8:05 AM, Piter Oliveira Vergara <
piterv...@gmail.com> wrote:
>
> Hi!
>
> I've sucessfully configured the authentication through LDAP. I'm also authenticating users with ModelBackend and getting the permissions based on group membership with AUTH_LDAP_FIND_GROUP_PERMS and AUTH_LDAP_AUTHORIZE_ALL_USERS setted to True. It all looks fine so far.
>
> But when a user is authenticated via ModelBackend and he does not exists in LDAP, say, the django admin (admin) user, I get an AttributeError exception (debug info attached) when checking the user's permissions with get_group_permissions.
> Basically it tries to manipulate the user dn but user.ldap_user is None (since there is no ldap entry associated with the user).
>
> My question is:
> This is the expected behavior or I'm missing some configuration?
> In other words, when AUTH_LDAP_AUTHORIZE_ALL_USERS and AUTH_LDAP_FIND_GROUP_PERMS are True I'm supposed to be able to call get_group_permissions in a django user for which no LDAP user exists (to get the permissions avaliable from ModelBeckend)?
>
> thanks in advance
>
> --
> You received this message because you are subscribed to the Google Groups "django-auth-ldap" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
django-auth-ld...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.
> <debug-info.txt>