openmicroscopy/openmicroscopy — pull request #2283 by bpindelski (2014-04-10 15:08:14+00:00)
Title: Assist #11660: Add method for user creation based on LDAP username

This PR might require a bit more work in the Python-side of things.

In general, the changes introduce a new CLI method - ``bin/omero ldap create `` which takes an LDAP username, contacts the LDAP server, reads the user details and creates a new Experimenter instance filled in with those details. It should help @kennethgillen during demo account creation, as it removes the extra step of requiring the new user to login for the first time with an LDAP username (this can be handled by the new method).

Open questions (/cc @joshmoore):
1. ``ldap.py`` might need some extra logic to handle exceptional cases. Is the code passed to ``self.ctx.die`` following any logical pattern or can it be any number?
2. What should the logic do in case the Experimenter already exists in the DB? The method is defined as "idempotent" in the .ice file, but that's not really the truth.