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:
Created redmine issue http://projects.theforeman.org/issues/14735 from this bug
Upstream bug component is WebUI
WORKAROUND: Set the user you wish to delete to an Administrator role, then delete
Upstream bug component is Organizations and Locations
Moving to POST since upstream bug http://projects.theforeman.org/issues/14735 has been closed
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'"}
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