Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1314894 - Cannot delete non admin user
Summary: Cannot delete non admin user
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Organizations and Locations
Version: 6.2.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: Unspecified
Assignee: Marek Hulan
QA Contact: Roman Plevka
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
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:
Environment:
Last Closed: 2016-07-27 11:21:32 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 14735 0 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:
Always

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
WORKAROUND:

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
VERIFIED
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","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
{"id":21,"login":"DA59CpWfCZ","firstname":"DA59CpWfCZ","lastname":"DA59CpWfCZ","mail":"a","admin":false,"last_login_on":null,"auth_source_id":1,"created_at":"2016-05-06T13:46:21.952Z","updated_at":"2016-05-06T13:46:21.952Z","password_hash":"412b6f31ffb9b63e7d0ec077fe4c23f9a43fe349","password_salt":"7e84756958e8ac7f5988cebc33718358e06bfd90","locale":null,"avatar_hash":null,"default_organization_id":null,"default_location_id":null,"lower_login":"da59cpwfcz","mail_enabled":true,"timezone":null}

[ 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.

https://access.redhat.com/errata/RHBA-2016:1501


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