Bug 1517701

Summary: Navigating to Discovered host page with org_admin user shows invalid search query
Product: Red Hat Satellite Reporter: Nikhil Kathole <nkathole>
Component: Users & RolesAssignee: Tomer Brisker <tbrisker>
Status: CLOSED ERRATA QA Contact: Nikhil Kathole <nkathole>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: ajoseph, bbuckingham, dhlavacd, mhulan, zhunting
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman_discovery-9.1.5.3-1.fm1_14 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:54:37 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:
Attachments:
Description Flags
UI showing error none

Description Nikhil Kathole 2017-11-27 09:22:16 UTC
Created attachment 1359384 [details]
UI showing error

Description of problem: Navigating to Discovered host page with user having role org_admin shows Error: Invalid search query: Field 'organization_id' not recognized for searching!


Version-Release number of selected component (if applicable): Satellite 6.3 snap 26

 
How reproducible: always


Steps to Reproduce:
1. Login with admin
2. Navigate to Administer -> Roles 
3. Create role cloning Organization admin role
4. Create user providing location, organization and created role 
5. Login with created user
6. Try to navigate to Hosts -> Discovered host page

Actual results:

Could not able to navigate to discovered host page and UI shows error Error: Invalid search query: Field 'organization_id' not recognized for searching!


Expected results:

Can navigate to discovered host page. 


Additional info:

Comment 3 Marek Hulan 2017-12-11 16:55:12 UTC
Created redmine issue http://projects.theforeman.org/issues/21934 from this bug

Comment 4 Satellite Program 2017-12-18 15:24:33 UTC
Upstream bug assigned to tbrisker

Comment 5 Satellite Program 2017-12-18 15:24:36 UTC
Upstream bug assigned to tbrisker

Comment 6 Satellite Program 2017-12-18 17:24:44 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21934 has been resolved.

Comment 7 Nikhil Kathole 2017-12-27 14:01:37 UTC
VERIFIED

Version tested:
satellite 6.3 snap 30

Successfully navigated to discovered host page with org admin role user.

2017-12-27 08:58:05 0b4eab37 [app] [I] Started GET "/discovered_hosts" for IP at 2017-12-27 08:58:05 -0500
2017-12-27 08:58:05 0b4eab37 [app] [I] Processing by DiscoveredHostsController#index as HTML
2017-12-27 08:58:05 0b4eab37 [app] [I] Current user: test_org_admin (regular user)
2017-12-27 08:58:05 0b4eab37 [app] [I] Expire fragment views/tabs_and_title_records-4 (0.2ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-9.1.5.2/app/views/discovered_hosts
/_discovered_host.html.erb (8.6ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-9.1.5.2/app/views/discovered_hosts
/_discovered_host_modal.html.erb (52.1ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-9.1.5.2/app/views/discovered_hosts
/_discovered_hosts_list.html.erb (89.6ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-9.1.5.2/app/views/discovered_hosts
/index.html.erb within layouts/application (99.8ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered common/_searchbar.html.erb (5.5ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered layouts/_application_content.html.erb (6.4ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered home/_submenu.html.erb (9.0ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered home/_user_dropdown.html.erb (5.1ms)
2017-12-27 08:58:05 0b4eab37 [app] [I] Read fragment views/tabs_and_title_records-4 (0.2ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered home/_organization_dropdown.html.erb (12.9ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered home/_location_dropdown.html.erb (14.6ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered home/_org_switcher.html.erb (29.0ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered home/_submenu.html.erb (17.6ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered home/_submenu.html.erb (33.8ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered home/_submenu.html.erb (5.9ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered home/_submenu.html.erb (28.8ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered home/_submenu.html.erb (13.7ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered home/_submenu.html.erb (12.0ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered home/_submenu.html.erb (9.5ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered home/_submenu.html.erb (12.7ms)
2017-12-27 08:58:05 0b4eab37 [app] [I] Write fragment views/tabs_and_title_records-4 (1.9ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered home/_topbar.html.erb (317.4ms)
2017-12-27 08:58:05 0b4eab37 [app] [I]   Rendered layouts/base.html.erb (322.3ms)
2017-12-27 08:58:05 0b4eab37 [app] [I] Completed 200 OK in 554ms (Views: 418.9ms | ActiveRecord: 29.0ms)

Comment 9 Satellite Program 2018-02-21 16:54:37 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-2018:0336