Project

General

Profile

Bug #10627

Monitor -> Reports will show reports for hosts not in the Organization context

Added by Tommy McNeely over 6 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Organizations and Locations
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

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

Related to Foreman - Bug #8817: PGError: ERROR: missing FROM-clause entry for table "hostgroups"Closed2014-12-31
Related to Foreman - Bug #10632: Operation FAILED: No route matches {:controller=>"reports", :host_id=>nil} on loginNew2015-05-27

Associated revisions

Revision 9926db42 (diff)
Added by Dominic Cleal over 6 years ago

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.

Revision 5b157a27 (diff)
Added by Dominic Cleal over 6 years ago

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 over 6 years ago

  • Category changed from Web Interface to Organizations and Locations

#2 Updated by Dominic Cleal over 6 years ago

  • Related to Bug #8817: PGError: ERROR: missing FROM-clause entry for table "hostgroups" added

#3 Updated by Dominic Cleal over 6 years ago

  • Legacy Backlogs Release (now unused) set to 56

#4 Updated by Dominic Cleal over 6 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal

#5 Updated by The Foreman Bot over 6 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 over 6 years ago

  • Related to Bug #10632: Operation FAILED: No route matches {:controller=>"reports", :host_id=>nil} on login added

#7 Updated by Dominic Cleal over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF