-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CLI info, listusers and listgroups subcommands #3350
Conversation
This new subcommand should list the members of the current group using the session context). Most of the arguments and logic of the user list subcommand are re-used and the common elements are migrated to the ArgumentParser and UserGroupControl classes
This new subcommand should list the groups of the current users. Most of the arguments and logic of the group list subcommand are re-used and the common elements are migrated to the ArgumentParser and UserGroupControl classes.
@@ -23,7 +23,8 @@ | |||
from omero.cli import CLI | |||
import pytest | |||
|
|||
subcommands = ['add', 'list', 'password', 'email', 'joingroup', 'leavegroup'] | |||
subcommands = ['add', 'list', 'password', 'email', 'joingroup', 'leavegroup', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder if this could be added to the "BaseControl" API? Somehow it should be possibly to figure out what commands are available...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely a sensible idea, will try to work on that in a separate branch.
Various
|
Some of above also applies to |
On the last question, one of the relevant PRs was #514. As far as I can tell, the main reason for doing this is that |
Excluding to let #3356 be reviewed. More work coming / PR description will be updated. |
PR description/title updated to describe the new subcommands. |
I've managed to briefly check out the commands and most of the options. I don't know if there is more to come but I'll take another look tomorrow once the later commits have been tested by the CI system. |
This looks fine to me. Everything seems to work as expected. Good to merge. |
Add CLI info, listusers and listgroups subcommands
Fixes https://trac.openmicroscopy.org/ome/ticket/12589
This PR adds
a
info
subcommand to bothUserControl
andGroupControl
plugins. These commands have the same behavior as thelist
subcommand for a subset of users/groups. The following commands should now be accepteda
bin/omero group listusers
and abin/omero user listgroups
subcommands. Both subcommands either take no argument (using the context) or a single argument. The following calls should work:To test this PR:
user list
andgroup list
subcommands which were refactored as part of this PR--no-rebase