openmicroscopy/openmicroscopy — pull request #2399 by bpindelski (2014-04-30 09:52:46+00:00)
Title: Assist #11660: Add method for user creation based on LDAP username (rebased onto develop)

This is the same as gh-2283 but rebased onto develop.

----

This PR might require a bit more work in the Python-side of things (e.g. flake8).

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.~~