Hide Forgot
Description of problem: When a user removes a group from a system, Beaker does not also clear the group admin rights (if any). As a result it is possible to have a system where a group has admin rights but does not appear in the Groups tab on the system page. Steps to Reproduce: 1. On the Groups tab of the system page, add a group to a system 2. Grant that group admin rights 3. Remove the group Actual results: Group can still administer the system, even though it doesn't appear in the list of groups. Expected results: Admin rights should be removed when group is removed.
The following query can be used as a one-off cleanup, to remove group admin rights which should not be set: DELETE FROM system_admin_map WHERE (system_id, group_id) NOT IN (SELECT system_id, group_id FROM system_group);
Patch pushed to Gerrit for review: http://gerrit.beaker-project.org/947