Bug 797584

Summary: Removing a group from a system does not also remove group admin rights
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: inventoryAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 0.8CC: bpeck, mcsontos, rmancy, stl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-26 07:16:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dan Callaghan 2012-02-26 22:53:04 UTC
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.

Comment 1 Dan Callaghan 2012-02-26 23:06:08 UTC
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);

Comment 3 Dan Callaghan 2012-02-28 00:38:16 UTC
Patch pushed to Gerrit for review: http://gerrit.beaker-project.org/947