Bug 1257020

Summary: when a user account is removed from Beaker (closed), the user is not removed from Beaker groups
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: generalAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 20CC: dcallagh, dgeevarg, dowang, mjia, rjoost
Target Milestone: 22.0Keywords: NeedsTestCase
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-14 05:33:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dan Callaghan 2015-08-26 06:03:13 UTC
Description of problem:
When a Beaker user account is (marked as) removed, its group memberships are still left behind.

Version-Release number of selected component (if applicable):
20.2

How reproducible:
easily

Steps to Reproduce:
1. Create a user account and add them to a group.
2. Remove the account (Admin -> Accounts in the web UI then click Remove, or use bkr remove-account).
3. Check the membership list for the group.

Actual results:
The removed user is still present.

Expected results:
The removed user should be removed from all groups as well, with a suitable activity record indicating that they were removed from each group.

Additional info:
This bug is really cosmetic only, since a removed user still cannot log in and their outstanding reservations and loans and systems are changed when they are removed.

The patch needs to include a db migration which will find existing removed accounts and clean up their group memberships, with a suitable activity entry.

Comment 1 Dan Callaghan 2015-08-28 05:35:30 UTC
Need to remove the user from all access policies as well.

Comment 2 Dan Callaghan 2015-12-01 05:15:29 UTC
Going to target this for develop only, because there are a lot of changes to the group code from release-21 -> develop.

Comment 3 Dan Callaghan 2015-12-01 07:48:30 UTC
Well the db migration was a lot harder than I expected...

Patch posted for review:
http://gerrit.beaker-project.org/4516
although I will need to fix it up a bit after inverted groups (bug 1220610) lands.

Comment 4 Roman Joost 2015-12-08 01:31:43 UTC
This bug fix is included in beaker-server-22.0-0.git.113.08aeea9 which is currently available for testing here:

https://beaker-devel.app.eng.bos.redhat.com/

Comment 6 Dan Callaghan 2016-01-14 05:33:06 UTC
Beaker 22.0 has been released.