netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.79k stars 2.54k forks source link

Permissions constraints are not applied to instances count within a device type #5682

Closed cpmills1975 closed 3 years ago

cpmills1975 commented 3 years ago

Environment

Steps to Reproduce

Similar to #5681

  1. Create a device type (devicetype_a)
  2. Create two device of devicetype_a (name "device_a" and "device_b")
  3. 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" }
  4. Create a permissions rule that grants view permissions on dcim > device types
  5. View the list of device types /dcim/device-types
  6. Observe the number of instances of devicetype_a is 2
  7. Click on the instance count 2 to view the list of devices of type devicetype_a
  8. Observe that only one device (device_a) is shown

Expected Behavior

/dcim/device-types should show only one instance of devicetype_a

Observed Behavior

There appears to be two devices of devicetype_a, but the test user can only see one.

stale[bot] commented 3 years ago

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.

github-actions[bot] commented 3 years ago

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.