Implement user and person creation
Currently, ldap_create_user() just prepares some variables, but does not interact with the LDAP server.
In order to make this work, we also need a new structure and frontend to configure mappings.
How will this work?
- The administrator visits the data mangement menu, and chooses "LDAP mappings"
- The "LDAP mapping" page lists all kinds of models that have mappings configured
- The adminsitrator can add a new set of mappings for a model class, e.g. for
Person
- The administrator needs to configure the base DN for new objects
- The administrator needs to configure the
objectClass
es for new objects
- Creating or editing a set of mappings leads to a page listing all mappings for this model
- The mappings are based on the LDAP attributes, with each mapping having the following columns:
-
ldap_attribute
: The name of the LDAP attribute -
read_regex
: A regular expression for reading the attribute. This should be, for example(?<first_name>.*) (?<last_name>.*)
to dissect acn
-
write_template
: A Django template fed with the model instance, generating the LDAP value
-
Caveats
- A migration is needed to transfer the existing preferences into a mapping set for
Person