Bug 1314894 - Cannot delete non admin user
Summary: Cannot delete non admin user
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Organizations and Locations
Version: 6.2.0
Hardware: x86_64
OS: Linux
high vote
Target Milestone: Unspecified
Assignee: Marek Hulan
QA Contact: Roman Plevka
URL: http://projects.theforeman.org/issues...
Depends On:
TreeView+ depends on / blocked
Reported: 2016-03-04 18:54 UTC by Oleksandr Shtaier
Modified: 2019-09-26 16:22 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-07-27 11:21:32 UTC
Target Upstream Version:

Attachments (Terms of Use)
Screenshot with issue for UI (24.42 KB, image/png)
2016-03-04 18:54 UTC, Oleksandr Shtaier
no flags Details

System ID Priority Status Summary Last Updated
Foreman Issue Tracker 14735 None None None 2016-04-22 15:49:31 UTC

Description Oleksandr Shtaier 2016-03-04 18:54:43 UTC
Created attachment 1133232 [details]
Screenshot with issue for UI

Description of problem:
When try to delete non admin user getting next error in UI

"Oops, we're sorry but something went wrong UserRole#expire_topbar_cache delegated to owner.expire_topbar_cache, but owner is nil: #<UserRole id: 478, owner_id: 376, role_id: 21, owner_type: "User">"

Version-Release number of selected component (if applicable):
6.2 SNAP 2.1

How reproducible:

Steps to Reproduce:
1. Create new default user (non-admin)
2. Try to delete it

Actual results:
User is not deleted and exception is raised

Expected results:
User is deleted successfully

Additional info:

Comment 2 Brad Buckingham 2016-04-20 14:20:44 UTC
Created redmine issue http://projects.theforeman.org/issues/14735 from this bug

Comment 3 Bryan Kearney 2016-04-20 16:03:58 UTC
Upstream bug component is WebUI

Comment 5 Mike McCune 2016-04-20 18:47:31 UTC

Set the user you wish to delete to an Administrator role, then delete

Comment 8 Bryan Kearney 2016-04-26 17:18:29 UTC
Upstream bug component is Organizations and Locations

Comment 9 Bryan Kearney 2016-04-27 08:04:28 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/14735 has been closed

Comment 10 Roman Plevka 2016-05-06 14:16:51 UTC
on sat6.2.0 Beta (GA10)

deleting user using UI and API works.

$ curl -k -u admin:changeme https://sat6server.com/api/v2/users/21
{"firstname":"DA59CpWfCZ","lastname":"DA59CpWfCZ","mail":"a@b.com","admin":false,"auth_source_id":1,"auth_source_name":"Internal","timezone":null,"locale":null,"last_login_on":null,"created_at":"2016-05-06 13:46:21 UTC","updated_at":"2016-05-06 13:46:21 UTC","id":21,"login":"DA59CpWfCZ","default_location":null,"locations":[{"id":75,"name":"eRtMtKFusl","title":"eRtMtKFusl","description":""}],"default_organization":null,"organizations":[],"auth_source_internal":{"id":1,"type":"AuthSourceInternal","name":"Internal"},"mail_notifications":[],"roles":[{"name":"Anonymous","id":14}],"usergroups":[]}[ rplevka@dhcp130-165:~ ]$ 

[ rplevka@dhcp130-165:~ ]$ curl -k -u admin:changeme -X DELETE https://sat6server.com/api/v2/users/21

[ rplevka@dhcp130-165:~ ]$ curl -k -u admin:changeme https://sat6server.com/api/v2/users/21
  "error": {"message":"Resource user not found by id '21'"}

Comment 11 Bryan Kearney 2016-07-27 11:21:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.