Adding --as-default to CLI omero user joingroup#5914
Closed
kennethgillen wants to merge 1 commit intoome:developfrom
Closed
Adding --as-default to CLI omero user joingroup#5914kennethgillen wants to merge 1 commit intoome:developfrom
kennethgillen wants to merge 1 commit intoome:developfrom
Conversation
… and a helper function to set the default group for a user.
Member
|
Thanks for this, @kennethgillen. I don't know if I will have time to make a commit today but on top of this I would imagine the following:
|
Member
Author
|
Thanks for the initial review. I don't see a need to rush this into the codebase as is - I'll just use my own branch to do the necessary job to fulfil my own need. To some extent this PR is mainly to add a foundation to build upon. |
Member
|
flake8 |
Member
|
migrated to: ome/omero-py#199 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding a parameter to set a user's default group when joining a new group, and a helper function to set the default group for a user.
Ideally the CLI should also allow an ad-hoc "set group" command on it's own, but I see this as an incremental improvement towards that goal, and it certainly answers the use case I have for adding users to a group and setting that to be the default group in one command.
What this PR does
Allows a CLI user to set the default group of a user when adding the user to a group.
Testing this PR
Apply the diff in this PR.
Identify a group which your test user does not belong to.
Issue a CLI command with the new
--as-defaultflag like so, with 103 as an example:Then issue a further
Output like the following should appear, if the user was not already a member of the group.
Then
Related reading
Link to cards, tickets, other PRs: https://trello.com/c/sjEk7VQG/487-cli-manage-group-and-user-missing-features
background for understanding this PR
what this PR assists, fixes, or otherwise affects
The missing ability to set the default group of a user by the CLI.