sources/ldap: add limited support for attributes as object_fields on LDAPPropertyMappings
This commit is contained in:
parent
1e97af772f
commit
6292049c74
|
@ -169,7 +169,13 @@ class Connector:
|
|||
value = mapping.evaluate(user=None, request=None, ldap=attributes)
|
||||
if value is None:
|
||||
continue
|
||||
properties[mapping.object_field] = value
|
||||
object_field = mapping.object_field
|
||||
if object_field.startswith("attributes."):
|
||||
properties["attributes"][
|
||||
object_field.replace("attributes.", "")
|
||||
] = value
|
||||
else:
|
||||
properties[object_field] = value
|
||||
except PropertyMappingExpressionException as exc:
|
||||
LOGGER.warning("Mapping failed to evaluate", exc=exc, mapping=mapping)
|
||||
continue
|
||||
|
|
Reference in New Issue