Project

General

Profile

Actions

Bug #17526

closed

Taxonomy.ignore? does not work with "any context"

Added by Daniel Lobato Garcia about 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Organizations and Locations
Target version:
Fixed in Releases:
Found in Releases:

Description

In this scenario:

1. User has one organization - "E-Corp" - this organization allows the user to see every hostgroup (via selecting "all host groups" when editing the organization).
2. User has a location "Czech republic" that also includes all host groups through that checkbox.
3. User visits /hostgroups with "any context" selected, or "E-Corp/any location", or "any organization/Czech republic". The result is that the user does not see all host groups even though there's an organization/location combination (e-corp/czech republic) that should allow the user to see all host groups.

The reason is that when `Hostgroup.taxable_ids` is called `Organization.ignore?` does not realize that there it should look in all Organizations to see if any of them 'ignores' (has "all host groups" checked) the resource. The same thing happens with Locations.

The fix is to make `ignore?` aware the 'Organization.current == nil' means 'Any organization', not 'No organization'.

Actions #1

Updated by The Foreman Bot about 8 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Daniel Lobato Garcia
  • Pull request https://github.com/theforeman/foreman/pull/4070 added
Actions #2

Updated by Daniel Lobato Garcia about 8 years ago

  • Target version set to 1.4.3
Actions #3

Updated by The Foreman Bot almost 8 years ago

  • Pull request https://github.com/theforeman/foreman/pull/3961 added
Actions #4

Updated by Daniel Lobato Garcia almost 8 years ago

  • Target version changed from 1.4.3 to 169
Actions #5

Updated by Anonymous almost 8 years ago

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

Updated by Dominic Cleal almost 8 years ago

  • Translation missing: en.field_release set to 209
Actions #7

Updated by The Foreman Bot almost 8 years ago

  • Pull request https://github.com/theforeman/foreman/pull/4236 added
Actions #8

Updated by Brad Buckingham almost 8 years ago

  • Target version deleted (169)
Actions #9

Updated by Daniel Lobato Garcia almost 8 years ago

  • Target version set to 1.11.0
Actions

Also available in: Atom PDF