fix issue related to python-ldap returning lists
Before, no particular treatment was done on the user attributes.
This caused some issues because python-ldap systematically returns
the attribute value as a list (even if it's mono-valuated).

Now we recover the attributes used in the group attr templates,
and we "normalize" the user attributes before using it in add_to_groups
and del_from_groups.

By normalize, we mean, transforming the list to it's unique value.
In case the attribute doesn't exist or is multi-valuated, it raises an
error.
1 parent 55ce2be commit 3fd6dcee824fa3fa87d3431b1c3b6f1527c8a214
@kakwa kakwa authored on 16 Mar 2017
Showing 1 changed file
View
ldapcherry/backend/backendLdap.py