subnet not matching domain available as choice when creating new host
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1158918
Description of problem:
We've noticed that subnets which are not part of the selected domain are available as a valid choice in the WEBUI when creating a new host.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Go to https://satellite6ga.lab.arn.redhat.com/subnets
2. Select a subnet
3. Go to the "Domains" tab
4. Ensure that there is at least one un-checked domain for your subnet
5. Create a new host
6. On the "Network" tab, select the subnet which was unchecked in the tab above.
7. Note that the subnet for which the domain was unchecked still is a valid option in the "subnets" drop-down
I would expect that only matching subnet/domain pairs would be choosable in the UI.
#1 Updated by Dominic Cleal about 6 years ago
- Category set to Host creation
Looks like domain_subnets in app/helpers/hosts_and_hostgroups_helper.rb is calling .with_taxonomy_scope_override, but this method is irritatingly using .unscoped (see also: #5445) which means we lose the scoping of subnets specific to that domain, and instead get all subnets.