Bug #10627
Monitor -> Reports will show reports for hosts not in the Organization context
Description
When I have the Organization context set, and select Monitor -> Reports, I end up with "blank" hosts (nil), because the reports belong to orgs that are not in the context.
https://www.dropbox.com/s/gofr1n5hsjjm43d/Screenshot%202015-05-27%2007.56.59.png?dl=0
If I change the context back to "Any Organization" ... then the host links aren't nil anymore...
https://www.dropbox.com/s/9rqyzdyz6qvmeqo/Screenshot%202015-05-27%2007.57.14.png?dl=0
The reports that are associated to hosts not in the current organization context should not appear at all.
~tommy
Related issues
Associated revisions
fixes #10627 - apply host taxonomy scope to facts/report joins
Previous changes to perform a join onto hosts with authorisation result
in a query such as Report.joins(:hosts), which ignores any
default_scope on Host::Base. This commit explicitly passes taxonomy
conditionals into the Authorizer to re-apply it.
(cherry picked from commit 9926db4274e2d9d01466676116a9c001f473f1a4)
Conflicts:
app/models/host/base.rb
app/services/authorizer.rb
History
#1
Updated by Dominic Cleal about 7 years ago
- Category changed from Web Interface to Organizations and Locations
#2
Updated by Dominic Cleal about 7 years ago
- Related to Bug #8817: PGError: ERROR: missing FROM-clause entry for table "hostgroups" added
#3
Updated by Dominic Cleal about 7 years ago
- Legacy Backlogs Release (now unused) set to 56
#4
Updated by Dominic Cleal about 7 years ago
- Status changed from New to Assigned
- Assignee set to Dominic Cleal
#5
Updated by The Foreman Bot about 7 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2448 added
- Pull request deleted (
)
#6
Updated by Dominic Cleal about 7 years ago
- Related to Bug #10632: Operation FAILED: No route matches {:controller=>"reports", :host_id=>nil} on login added
#7
Updated by Dominic Cleal about 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 9926db4274e2d9d01466676116a9c001f473f1a4.
fixes #10627 - apply host taxonomy scope to facts/report joins
Previous changes to perform a join onto hosts with authorisation result
in a query such as Report.joins(:hosts), which ignores any
default_scope on Host::Base. This commit explicitly passes taxonomy
conditionals into the Authorizer to re-apply it.