Instance count of devices and VMs on platforms list is not limited by visibility constraints #4495

Closed
opened 2025-12-29 18:36:37 +01:00 by adam · 2 comments
Owner

Originally created by @cpmills1975 on GitHub (Jan 26, 2021).

Environment

Python version: 3.9
NetBox version: 2.10.3

Steps to Reproduce

Similar to #5681

  1. Create a platform (platform_a)
  2. Create two devices with platform_a (name "device_a" and "device_b")
  3. Create two VMs with platform_a (name "vm_a" and "vm_b")
  4. Create a permissions rule that grants view permissions on dcim > device, but limit the devices visible to just one of the devices with a suitable constraint e.g. { "name": "device_a" }
  5. Create a permissions rule that grants view permissions on virtualisation > virtual machine, but limit the VMs visible to just one of the VMs with a suitable constraint e.g. { "name": "vm_a" }
  6. Create a permissions rule that grants view permissions on platforms
  7. View the list of platforms
  8. Observe the number of instances of platform_a is 2 devices and 2 VMs
  9. Click on the instance count 2 to view the list of devices or VMs of platform platform_a
  10. Observe that only one device (device_a) or one VM (vm_a) is shown

Expected Behavior

The count of devices and VMs should reflect the total number visible to the user

Observed Behavior

The count of devices and VMs reflects the total number of that platform in the database and is not constrained to those visible to the user.

Originally created by @cpmills1975 on GitHub (Jan 26, 2021). ### Environment Python version: 3.9 NetBox version: 2.10.3 ### Steps to Reproduce Similar to #5681 1. Create a platform (platform_a) 2. Create two devices with platform_a (name "device_a" and "device_b") 3. Create two VMs with platform_a (name "vm_a" and "vm_b") 4. Create a permissions rule that grants view permissions on dcim > device, but limit the devices visible to just one of the devices with a suitable constraint e.g. { "name": "device_a" } 5. Create a permissions rule that grants view permissions on virtualisation > virtual machine, but limit the VMs visible to just one of the VMs with a suitable constraint e.g. { "name": "vm_a" } 5. Create a permissions rule that grants view permissions on platforms 6. View the list of platforms 7. Observe the number of instances of platform_a is 2 devices and 2 VMs 8. Click on the instance count 2 to view the list of devices or VMs of platform platform_a 9. Observe that only one device (device_a) or one VM (vm_a) is shown ### Expected Behavior The count of devices and VMs should reflect the total number visible to the user ### Observed Behavior The count of devices and VMs reflects the total number of that platform in the database and is not constrained to those visible to the user.
adam added the pending closure label 2025-12-29 18:36:37 +01:00
adam closed this issue 2025-12-29 18:36:38 +01:00
Author
Owner

@stale[bot] commented on GitHub (Mar 19, 2021):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.

@stale[bot] commented on GitHub (Mar 19, 2021): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Apr 14, 2021):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Apr 14, 2021): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4495