Bug 1314894 - Cannot delete non admin user
Cannot delete non admin user
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Organizations and Locations (Show other bugs)
x86_64 Linux
unspecified Severity high (vote)
: GA
: --
Assigned To: Marek Hulan
Roman Plevka
: Regression, Triaged
Depends On:
  Show dependency treegraph
Reported: 2016-03-04 13:54 EST by Oleksandr Shtaier
Modified: 2016-07-27 07:21 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-07-27 07:21:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 14735 None None None 2016-04-22 11:49 EDT

  None (edit)
Description Oleksandr Shtaier 2016-03-04 13:54:43 EST
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 10:20:44 EDT
Created redmine issue http://projects.theforeman.org/issues/14735 from this bug
Comment 3 Bryan Kearney 2016-04-20 12:03:58 EDT
Upstream bug component is WebUI
Comment 5 Mike McCune 2016-04-20 14:47:31 EDT

Set the user you wish to delete to an Administrator role, then delete
Comment 8 Bryan Kearney 2016-04-26 13:18:29 EDT
Upstream bug component is Organizations and Locations
Comment 9 Bryan Kearney 2016-04-27 04:04:28 EDT
Moving to POST since upstream bug http://projects.theforeman.org/issues/14735 has been closed
Comment 10 Roman Plevka 2016-05-06 10:16:51 EDT
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 07:21:32 EDT
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.