Problem: I’m wondering how I can grant read-only permissions to all hosts in all Locations and any new Locations that get created?
We use a single Org so we don’t have to have multiple Content Views. We’ve landed on using Locations to place our different clients in. I can’t figure out how to effectively grant permissions to hosts in all locations.
I’ve tried a thousand things, read the very limited manual section, and spent a lot of time reviewing previous forum threads. I understand that permissions around Orgs and Locs are tricky. The only thing that has worked is adding individual users to the Locations.
I setup a role that has Unlimited access to View_locations and view_hosts - with no Orgs or Locs specified. I also tried assigning our main Org and all Locations to the role.
Expected outcome: Granting a role Unlimited view_hosts and view_locations would allow a user on that role to view all Hosts in all Locations.
Foreman and Proxy versions: 1.23.0
Distribution and version: CentOS Linux release 7.7.1908
Other relevant data:
Permissions debug output:
2019-10-23T14:13:08 [I|app|1211a9d4] Started GET “/locations” for 69.67.17.128 at 2019-10-23 14:13:08 -0500
2019-10-23T14:13:08 [I|app|1211a9d4] Processing by LocationsController#index as HTML
2019-10-23T14:13:08 [I|per|1211a9d4] Current user set to [redacted] (regular)
2019-10-23T14:13:08 [D|tax|1211a9d4] Current location set to none
2019-10-23T14:13:08 [D|tax|1211a9d4] Current organization set to [redacted]
2019-10-23T14:13:08 [D|per|1211a9d4] checking permission view_hosts for class Host
2019-10-23T14:13:08 [D|per|1211a9d4] organization_ids:
2019-10-23T14:13:08 [D|per|1211a9d4] location_ids:
2019-10-23T14:13:08 [D|per|1211a9d4] filter with role_id: 18 limited: false search: taxonomy_search:
2019-10-23T14:13:08 [I|app|1211a9d4] Rendering taxonomies/index.html.erb within layouts/application
2019-10-23T14:13:08 [I|app|1211a9d4] Rendering text template
2019-10-23T14:13:08 [I|app|1211a9d4] Rendered text template (0.0ms)
2019-10-23T14:13:08 [I|app|1211a9d4] Rendered taxonomies/index.html.erb within layouts/application (9.8ms)
2019-10-23T14:13:08 [I|app|1211a9d4] Rendered common/_searchbar.html.erb (6.6ms)
2019-10-23T14:13:08 [I|app|1211a9d4] Rendered layouts/_application_content.html.erb (8.0ms)
2019-10-23T14:13:08 [I|app|1211a9d4] Rendering layouts/base.html.erb
2019-10-23T14:13:08 [I|app|1211a9d4] Rendered layouts/base.html.erb (85.5ms)
2019-10-23T14:13:08 [I|app|1211a9d4] Completed 200 OK in 183ms (Views: 98.6ms | ActiveRecord: 23.6ms)