Skip to content

Expected behaviour on LDAP optional fields #13

Description

@alexbarcelo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions