Bug 1655870

Summary: Unable to delete filters on a Role using system admin
Product: Red Hat Satellite Reporter: Sanket Jagtap <sjagtap>
Component: Users & RolesAssignee: Ondřej Pražák <oprazak>
Status: CLOSED ERRATA QA Contact: Sanket Jagtap <sjagtap>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: dhlavacd, mhulan, zhunting
Target Milestone: 6.5.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-1.20.1.3-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-14 12:39:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sanket Jagtap 2018-12-04 07:06:40 UTC
Description of problem:


Version-Release number of selected component (if applicable):
Build:Satellite 6.5.0 Snap 6

How reproducible:
Always from WebUI 

Steps to Reproduce:
1. Create a User with system admin
2. Login with system admin user, try to clone a role and delete any filter from role
3.

Actual results:
Unable to delete the Filters on the cloned role. With error

Filter not found Please try to update your request

Expected results:
System admin should be able to delete the filters on roles

Additional info:
2018-12-04T02:05:02 [I|app|] Started DELETE "/filters/316?role_id=30-aaa" for 10.67.117.3 at 2018-12-04 02:05:02 -0500
2018-12-04T02:05:02 [I|app|cd911] Processing by FiltersController#destroy as HTML
2018-12-04T02:05:02 [I|app|cd911]   Parameters: {"authenticity_token"=>"2neQLqJSRz997DBy6KoRvDVExRm7gTAbBZ6ULjF8egl+wl43QAQmkNpnsBHpLoXfled3SqpJYCrdqZjCo9OoGA==", "role_id"=>"30-aaa", "id"=>"316"}
2018-12-04T02:05:02 [I|app|cd911] Current user set to sa (regular)
2018-12-04T02:05:02 [I|app|cd911]   Rendering common/404.html.erb within layouts/application
2018-12-04T02:05:02 [I|app|cd911]   Rendered common/404.html.erb within layouts/application (1.5ms)
2018-12-04T02:05:02 [I|app|cd911]   Rendered layouts/_application_content.html.erb (0.5ms)
2018-12-04T02:05:02 [I|app|cd911]   Rendering layouts/base.html.erb
2018-12-04T02:05:02 [I|app|cd911]   Rendered layouts/base.html.erb (2.2ms)
2018-12-04T02:05:02 [I|app|cd911] Completed 404 Not Found in 64ms (Views: 6.3ms | ActiveRecord: 15.9ms)
2018-12-04T02:05:03 [I|app|] Started GET "/notification_recipients" for 10.67.117.3 at 2018-12-04 02:05:03 -0500
2018-12-04T02:05:03 [I|app|ffe3e] Processing by NotificationRecipientsController#index as JSON
2018-12-04T02:05:03 [I|app|ffe3e] Current user set to sa (regular)
2018-12-04T02:05:03 [I|app|ffe3e] Completed 200 OK in 38ms (Views: 0.2ms | ActiveRecord: 8.4ms)

Comment 5 Marek Hulan 2018-12-07 13:13:48 UTC
Created redmine issue https://projects.theforeman.org/issues/25648 from this bug

Comment 6 Satellite Program 2018-12-13 09:11:34 UTC
Upstream bug assigned to oprazak

Comment 7 Satellite Program 2018-12-13 09:11:36 UTC
Upstream bug assigned to oprazak

Comment 10 Sanket Jagtap 2019-01-09 12:37:29 UTC
Build : Satellite 6.5 snap 10

I was able to successfully delete the filter using a user with system admin role

Log:
2019-01-09T07:35:20 [I|app|] Started GET "/notification_recipients" for 0.0.223.198 at 2019-01-09 07:35:20 -0500
2019-01-09T07:35:20 [I|app|f89669c0] Processing by NotificationRecipientsController#index as JSON
2019-01-09T07:35:20 [I|app|f89669c0] Current user set to aa (regular)
2019-01-09T07:35:20 [I|app|f89669c0] Completed 200 OK in 40ms (Views: 0.2ms | ActiveRecord: 8.9ms)
2019-01-09T07:35:26 [I|app|] Started DELETE "/filters/323?role_id=30-system+admin" for 0.0.223.198 at 2019-01-09 07:35:26 -0500
2019-01-09T07:35:26 [I|app|26536ef8] Processing by FiltersController#destroy as HTML
2019-01-09T07:35:26 [I|app|26536ef8]   Parameters: {"authenticity_token"=>"5saE6vX9V8pA2UFv2n5Df+ioNS/S09tjjI5GWEUq4P3WaWgaU/EV0a02NE00aO9WfHokQb54pefJp/VI/pbUMg==", "role_id"=>"30-system admin", "id"=>"323"}
2019-01-09T07:35:26 [I|app|26536ef8] Current user set to aa (regular)
2019-01-09T07:35:26 [I|aud|26536ef8] Filter (323) destroy event on search 
2019-01-09T07:35:26 [I|aud|26536ef8] Filter (323) destroy event on role_id 30
2019-01-09T07:35:26 [I|aud|26536ef8] Filter (323) destroy event on taxonomy_search 
2019-01-09T07:35:26 [I|aud|26536ef8] Filter (323) destroy event on override false
2019-01-09T07:35:26 [I|aud|26536ef8] Filter (323) destroy event on organization_ids []
2019-01-09T07:35:26 [I|aud|26536ef8] Filter (323) destroy event on location_ids []
2019-01-09T07:35:26 [I|app|26536ef8] Redirected to https://qe-sat6-feature-rhel7.sat-domain/filters?role_id=30-system+admin
2019-01-09T07:35:26 [I|app|26536ef8] Completed 302 Found in 120ms (ActiveRecord: 31.5ms)
2019-01-09T07:35:26 [I|app|] Started GET "/filters?role_id=30-system+admin" for 0.0.223.198 at 2019-01-09 07:35:26 -0500
2019-01-09T07:35:26 [I|app|5e7e6e19] Processing by FiltersController#index as HTML
2019-01-09T07:35:26 [I|app|5e7e6e19]   Parameters: {"role_id"=>"30-system admin"}
2019-01-09T07:35:27 [I|app|5e7e6e19] Current user set to aa (regular)
2019-01-09T07:35:27 [I|app|5e7e6e19]   Rendering filters/index.html.erb within layouts/application
2019-01-09T07:35:27 [I|app|5e7e6e19]   Rendered common/_pagination.html.erb (0.6ms)
2019-01-09T07:35:27 [I|app|5e7e6e19]   Rendered filters/index.html.erb within layouts/application

Comment 13 errata-xmlrpc 2019-05-14 12:39:22 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/RHSA-2019:1222