Description of problem: Could not add regular team as a member of domain by admin role.Have set team owner to get "max_teams" capability. Could update or remove a regular team from domain by admin role. And could add/remove/update a global team by admin role. Version-Release number of selected component (if applicable): rhc-1.23.0 build from fork_ami_origin_ui_174_1158 How reproducible: always Steps to Reproduce: 1.Create a regular team team1 by team owner xiuwang+ab 2.Add xiuwang1 as admin member of domain 3.Add team1 as admin member of domain by admin role rhc member-add team1 --type team -n abear -r admin -l xiuwang1 or rhc member-add --ids team1_id --type team -n abear -r admin -l xiuwang1 Actual results: Step 3: $ rhc member-add team1 --type team -n abear -r admin -l xiuwang1 Adding 1 administrator to domain ... No team with name 'team1' found. $ rhc member-add --ids 534680f00c8c51632b000049 --type team -n abear -r admin -l xiuwang1 Adding 1 administrator to domain ... There is no team with identifier 534680f00c8c51632b000049. Expected results: Could add regular team as a member of domain by admin role Additional info:
Only a team's owner can add them to a domain. Will improve the message when adding by name to "You do not have a team named '...'." Will merge improved message in https://github.com/openshift/rhc/pull/576
test on rhc-1.23.0 build from fork_ami_origin_ui_174_1162 The global team message not update. 1.# rhc member-add Global team 1 --type team --global -n curecat Adding 3 editors to domain ... No global team found with the name 'Global'. Did you mean one of the following? Global team 1 2.# rhc member-add 11 --type team --global -n curecat Adding 1 editor to domain ... No global team found with the name '11'.
The global team message wasn't supposed to be updated. 1. Should be `rhc member-add "Global team 1" --type team --global -n curecat` 2. If there is no global team with the name 11, then that message is correct.
Commit pushed to master at https://github.com/openshift/rhc https://github.com/openshift/rhc/commit/528c54c2981d1cf67051fc5a8a3d39a5bdac1a39 Bug 1086227: Improve message when a team cannot be found while adding
Verified on rhc-1.23.1 1.Add multiple partial global team matches but without one exact match $ rhc member-add team --type team --global -n curedogs Adding 1 editor to domain ... No global team found with the name 'team'. Did you mean one of the following? Global team 1, team1, team11 2.Add no-existed global team. $ rhc member-add 21 --type team --global -n curedogs Adding 1 editor to domain ... No global team found with the name '21'.