Description of problem: Currently beaker-init will only add a new user to the admin group. It should handle already existing users by simply looking them up and adding them to the group. Version-Release number of selected component (if applicable): 0.7.03
Bulk reassignment of issues as Bill has moved to another team.
http://gerrit.beaker-project.org/3506 Steps to reproduce: 1. Find an existing user account which is not in the admin group, or take an existing admin account and remove it from the admin group 2. On the server, run: beaker-init --user <username> Expected results: The existing user is added to the admin group.
Okay, I actually tested all the various cases properly this time: http://gerrit.beaker-project.org/3522 Possible combinations are: * db is empty, --user option is not passed -> error reported to the user and no action is taken * db is empty, --user does not exist -> db is populated, user is created and added to admin group * db schema is out of date, --user option is not passed -> db schema is upgraded * db schema is out of date, --user does not exist -> db schema is upgraded, user is created and added to admin group * db schema is out of date, --user is an existing user -> db schema is upgraded, existing user is added to admin group * db schema is up to date, --user option is not passed -> command does nothing * db schema is up to date, --user does not exist -> user is created and added to admin group * db schema is up to date, --user is an existing user -> existing user is added to admin group
Matt pointed out there is one more case I hadn't considered. * db schema is up to date, --user is an existing user and is already in the admin group -> command does nothing I will update my patch to handle that properly.
Beaker 19.1 is released.