Bug 1655870 - Unable to delete filters on a Role using system admin
Summary: Unable to delete filters on a Role using system admin
Status: VERIFIED
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Users & Roles   
(Show other bugs)
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: 6.5.0
Assignee: Ondřej Pražák
QA Contact: Sanket Jagtap
URL:
Whiteboard:
Keywords: Triaged
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-04 07:06 UTC by Sanket Jagtap
Modified: 2019-01-09 12:37 UTC (History)
3 users (show)

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:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 25648 None None None 2018-12-07 13:13 UTC

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 pm-sat@redhat.com 2018-12-13 09:11:34 UTC
Upstream bug assigned to oprazak@redhat.com

Comment 7 pm-sat@redhat.com 2018-12-13 09:11:36 UTC
Upstream bug assigned to oprazak@redhat.com

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


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