CLI spark commands to manage users#567
Closed
Conversation
Member
|
Thank you for the contribution! You have one commit without GPG signed. Please sign all the commit. There are some GitHub Action checks failed. |
Member
|
You committed some merge commits, but we do not use merge commits in PR branches. |
Author
|
Hi @kenjis , thanks for the feedback. I made all the necessary amendments to the code. If you think everything is ok, I can work also on the documentation. |
This pull request was closed.
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.
With the User command is possible by cli to run these actions on users :
'create', 'activate', 'deactivate', 'changename', 'changeemail', 'delete', 'password', 'list', 'addgroup', 'removegroup'Available options :
'-i' => 'User id'
'-u' => 'User name'
'-e' => 'User email'
'-nu' => 'New username'
'-ne' => 'New email'
'-g' => 'Group name'
1. create a new user
./spark shield:user create -u newuser -e newuser@myemail.com2. activate a user
by username :
./spark shield:user activate -u usernameor
by email :
./spark shield:user activate -e user@myemail.com3. deactivate a user
by username :
./spark shield:user deactivate -u usernameor
by email :
./spark shield:user deactivate -e user@myemail.com4. change user name
by username :
./spark shield:user changename -u username -nu newusernameor
by email :
./spark shield:user changename -e user@myemail.com -nu newusername5. change user email
by username :
./spark shield:user changeemail -u username -ne newuseremail@myemail.comor
by email :
./spark shield:user changeemail -e user@myemail.com -ne newuseremail@myemail.com6. delete a user
by user id :
./spark shield:user delete -i 123or
by username :
./spark shield:user delete -u useror
by email :
./spark shield:user delete -e user@myemail.com7. change a user password
by username :
./spark shield:user password -u usernameor
by email :
./spark shield:user password -e user@myemail.com8. list users
List all users :
./spark shield:user listor filter by username and/or email
./spark shield:user list -u user -e user@myemail.com9. add a user to a group
by username :
./spark shield:user addgroup -u username -g mygroupor
by email :
./spark shield:user addgroup -e user@myemail.com -g mygroup10. remove a user from a group
by username :
./spark shield:user removegroup -u username -g mygroupor
by email :
./spark shield:user removegroup -e user@myemail.com -g mygroupAll the options are optional and if the username or email are not passed on command line, a prompt will ask the user for the necessary information to complete the required task. The data inserted are validated and every operation asks for a confirmation to proceed.