I have an LDAP which have some optional fields, like mobile and email. My settings contain something
similar to the following:
LDAP_SYNC_USER_ATTRIBUTES = {
"uid": "username",
"givenName": "first_name",
"sn": "last_name",
"mail": "email",
"telephoneNumber": "mobile",
}
But with those settings, only the users with all the fields are created in Django, the ones without mobile are not.
I was planning to fix this behaviour, maybe send a pull request, but... what would be a nice behaviour? Silent omission? (And delegate to the user model the failure if required fields are not given) Maybe a flag like LDAP_SYNC_IGNORE_MISSING_FIELDS?
The silent omission may be the least intrusive one, but I am not sure if it fits every use case.
I have an LDAP which have some optional fields, like mobile and email. My settings contain something
similar to the following:
But with those settings, only the users with all the fields are created in Django, the ones without mobile are not.
I was planning to fix this behaviour, maybe send a pull request, but... what would be a nice behaviour? Silent omission? (And delegate to the user model the failure if required fields are not given) Maybe a flag like
LDAP_SYNC_IGNORE_MISSING_FIELDS?The silent omission may be the least intrusive one, but I am not sure if it fits every use case.