1👍
With the help of psagers’ tips, I managed to find the answer to my issue.
First, I’m using Open Directory, so I need to use AUTH_LDAP_GROUP_TYPE = PosixGroupType(name_attr=’cn’) instead of GroupOfNamesType().
Second, mapping the ‘is_active’ flag to the entire ‘groups’ container doesn’t make sense, because I can’t login when I use it, so I took it out.
3👍
If you set AUTH_LDAP_GROUP_SEARCH
, you also need to set AUTH_LDAP_GROUP_TYPE
. Since you’re apparently using groupOfNames for grouping, you need AUTH_LDAP_GROUP_TYPE = GroupOfNamesType()
.
Everything else looks okay, although it’s unlikely that you need both AUTH_LDAP_MIRROR_GROUPS
and AUTH_LDAP_FIND_GROUPS_PERMS
. It’s probably not hurting anything, but those are meant to be alternatives.
In general, logging is your friend in cases like this.
- [Django]-Ordering in a Python module
- [Django]-Adding many to many fields (M2M) manually in django?
- [Django]-Add users logged in through Python Social Auth to a group