Bug 814318

Summary: Deleting roles associated with a user still shows the user as associated to the deleted role.
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: user-experienceAssignee: Jason Connor <jconnor>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.0.6CC: mmccune, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: Sprint 34   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 791341 Environment:
Last Closed: 2012-05-25 14:16:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 791341    
Bug Blocks:    

Description Preethi Thomas 2012-04-19 15:07:48 UTC
+++ This bug was initially created as a clone of Bug #791341 +++

Description of problem:

If you associate a user to a role, and later delete the role, the user is listed as still associated to the deleted role/
Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Create a new user
2. Create a new role
3. Add the user to the role
4. Delete the role
5. Run user list 
  
Actual results:

User list shows that the user is still associated to the deleted role
Expected results:


Additional info:

[root@katello-test ~]# pulp-admin -u admin -p admin role list
+------------------------------------------+
               Available Roles
+------------------------------------------+
  super-users
  consumer-users
  test

[root@katello-test ~]# pulp-admin -u admin -p admin role delete --id=test
Usage: pulp-admin <options> role delete <options>

pulp-admin: error: no such option: --id
[root@katello-test ~]# pulp-admin -u admin -p admin role delete --role=test
Role [ test ] deleted

[root@katello-test ~]# pulp-admin -u admin -p admin role list
+------------------------------------------+
               Available Roles
+------------------------------------------+
  super-users
  consumer-users

[root@katello-test ~]# pulp-admin -u admin -p admin user list
+------------------------------------------+
               Available Users
+------------------------------------------+

Login :               	admin                    
Name  :               	None                     
Roles :               	super-users              


Login :               	preethi                  
Name  :               	None                     
Roles :               	test                     




[root@katello-test ~]# pulp-admin -u admin -p admin role list
+------------------------------------------+
               Available Roles
+------------------------------------------+
  super-users
  consumer-users

--- Additional comment from jconnor on 2012-04-12 16:57:43 EDT ---

added removal of role name from users' lists of role upon deletion
fix requires 2 patches
15b186bf09e7c0f9734c5612a829143a0c92a0c2
7aeb696ba6821d439bd7d4241001151fc4d50f1e

--- Additional comment from jconnor on 2012-04-12 16:59:35 EDT ---

pushed into pulp_v1 branch as well

--- Additional comment from jortel on 2012-04-12 18:59:11 EDT ---

build: 0.282

Comment 1 Preethi Thomas 2012-04-19 15:08:50 UTC
cloning for v2
and moving to on_qa

Comment 2 Preethi Thomas 2012-04-19 18:34:29 UTC
[root@preethi-el6-pulp ~]# rpm -q pulp
pulp-0.0.284-1.el6.noarch
[root@preethi-el6-pulp ~]# 
[root@preethi-el6-pulp ~]# 
[root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin user list
+------------------------------------------+
               Available Users
+------------------------------------------+

Login :               	admin                    
Name  :               	None                     
Roles :               	super-users              


Login :               	test                     
Name  :               	None                     
Roles :               	test                     


[root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin role list
+------------------------------------------+
               Available Roles
+------------------------------------------+
  super-users
  consumer-users
  test

[root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin role delete --id=test
Usage: pulp-admin <options> role delete <options>

pulp-admin: error: no such option: --id
[root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin role delete --role=test
Role [ test ] deleted

[root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin role list
+------------------------------------------+
               Available Roles
+------------------------------------------+
  super-users
  consumer-users

[root@preethi-el6-pulp ~]# pulp-admin -u admin -p admin user list
+------------------------------------------+
               Available Users
+------------------------------------------+

Login :               	admin                    
Name  :               	None                     
Roles :               	super-users              


Login :               	test                     
Name  :               	None                     
Roles :

Comment 3 Preethi Thomas 2012-05-25 14:16:32 UTC
Pulp v1.1 Release