openmicroscopy/openmicroscopy — pull request #2183 by joshmoore (2014-03-20 10:33:51+00:00)
Title: Login as cli

This PR adds a flag `--sudo` to allow logging in as another user:
```
$ bin/omero login --sudo=root t@localhost
Using session 84eb7a3d-603e-478e-83cf-dd53b655e6e5 (t@localhost:4064). Current group: sudotest
$ bin/omero login -C --sudo=root t@localhost
Password for root:
Created session 8c5514e3-89a1-4946-ba5f-7521bd938b8b (t@localhost:4064). Current group: sudotest
$ cat $(bin/omero sessions file)
omero.sess=8c5514e3-89a1-4946-ba5f-7521bd938b8b
omero.user=t
omero.host=localhost
omero.sudo=root
```
Currently this functionality is limited to system administrators only. If possible as a part of this PR, I'd like to also allow the functionality for group owners.

* [ ] Integration tests
* [ ] Allow group owner creation (must prevent switch-group on such sessions)
* [ ] Documentation and an example of import-as.