Issue 1095: The gerrit command line API should have more complete account management functionality
Status:  Released
Owner:
Closed:  May 2012
Reported by kd...@codeaurora.org, Aug 16, 2011
In addition to the ability to create accounts using the 'gerrit create-account' command, the command line interface should support the following functionality for accounts.

* set_inactive (sets inactive='Y' for a specified account)
* set_active (sets inactive='N')
* delete (deletes a specified account)
* add_to_group (adds the account to a specified group)
* query (list accounts matching an email address or full name)
* merge? (merge two accounts)

Aug 19, 2011
#1 kd...@codeaurora.org
Merging and deleting functionality do not exist in Gerrit yet, so I am moving them to separate issues:

Issue 1102
Issue 1103
Feb 23, 2012
Project Member #2 de...@spotify.com
I believe we should support what create-account[1] has to offer as well, to allow editing after creation.

* add_ssh_key
* delete_ssh_key
* add_email
* delete_email

I am not sure if editing the full name is a good idea though. And for deleting the account, I recommend we just set it's status to inactive and delete their ssh_keys, to keep the history of reviews intact.

[1] https://gerrit-review.googlesource.com/Documentation/cmd-create-account.html
Feb 23, 2012
Project Member #3 bruce.zu@sonymobile.com
about '* delete_email.'
please take account in the cases where the email has been used in commits  
Feb 23, 2012
Project Member #4 mf...@codeaurora.org
I see no reason not to be able to set the full name also, the user can change it themselves at anytime.  The username on the other hand is set once only.  So it sounds like maybe something like this:  

  set-account [--full-name <FULLNAME>] [--active|--inactive]
              [--add-email <EMAIL>] [--delete-email <EMAIL> | ALL]
              [--add-ssh-key - | <KEY>] [--delete-ssh-key - | <KEY> | ALL]

As for groups, I think they will be better served by the set-group-members command:
  https://gerrit-review.googlesource.com/#/q/status:open+project:gerrit+branch:master+topic:ssh-set-group-members,n,z


Bruce, could you explain your concerns with emails on commits?  Once a patch is uploaded it shouldn't be a problem I think?

Mar 6, 2012
Project Member #5 edwin.ke...@gmail.com
+1 for the proposed 'set-account' command, I was often thinking that such a command would be useful
Jul 21, 2012
Project Member #8 edwin.ke...@gmail.com
(No comment was entered for this change.)
Labels: FixedIn-2.5
Oct 31, 2012
Project Member #9 edwin.ke...@gmail.com
(No comment was entered for this change.)
Status: Released