Views don't honour the permissions structure #5185

Closed
opened 2025-12-29 19:25:14 +01:00 by adam · 2 comments
Owner

Originally created by @navisidhu on GitHub (Aug 17, 2021).

NetBox version

v2.11.11

Python version

3.8

Steps to Reproduce

  1. Create a VLAN with attached Prefix
  2. Setup a user that only has view permissions on VLANs.
  3. Log in as that user and search for the VLAN created.

Expected Behavior

The Prefix column in the VLAN list should not display the Prefix(es) attached to the VLAN.

Observed Behavior

The Prefix(es) attached are listed.
Screen Shot 2021-08-17 at 9 35 06 AM
Screen Shot 2021-08-17 at 9 37 31 AM

Originally created by @navisidhu on GitHub (Aug 17, 2021). ### NetBox version v2.11.11 ### Python version 3.8 ### Steps to Reproduce 1. Create a VLAN with attached Prefix 2. Setup a user that only has view permissions on VLANs. 3. Log in as that user and search for the VLAN created. ### Expected Behavior The Prefix column in the VLAN list should not display the Prefix(es) attached to the VLAN. ### Observed Behavior The Prefix(es) attached are listed. <img width="1020" alt="Screen Shot 2021-08-17 at 9 35 06 AM" src="https://user-images.githubusercontent.com/151050/129635560-35dd1bf2-cc34-40f8-8b6b-b2203648028f.png"> <img width="1347" alt="Screen Shot 2021-08-17 at 9 37 31 AM" src="https://user-images.githubusercontent.com/151050/129635565-a548b800-286a-42f7-b2fd-68d92e9eda7a.png">
adam closed this issue 2025-12-29 19:25:15 +01:00
Author
Owner

@navisidhu commented on GitHub (Aug 17, 2021):

I've got a PR ready [ #6964: Currently closed. ] which fixes the issue with the VLAN Table view, but I suspect this to be a bigger issue and would need to go though the UI template code and check if permission structure is used correctly.

I can resubmit the PR once this get approved.

@navisidhu commented on GitHub (Aug 17, 2021): I've got a PR ready [ #6964: Currently closed. ] which fixes the issue with the VLAN Table view, but I suspect this to be a bigger issue and would need to go though the UI template code and check if permission structure is used correctly. I can resubmit the PR once this get approved.
Author
Owner

@jeremystretch commented on GitHub (Aug 17, 2021):

The intent of object-based permissions in NetBox is not to hide the existence of non-permitted objects, as that would be often infeasible. Rather, it is to prevent access by unauthorized users to the details of a non-permitted object. So, it's valid to show that there's a relationship from a permitted object (a VLAN, in this example), to a non-permitted object (the prefix).

@jeremystretch commented on GitHub (Aug 17, 2021): The intent of object-based permissions in NetBox is not to hide the existence of non-permitted objects, as that would be often infeasible. Rather, it is to prevent access by unauthorized users to the details of a non-permitted object. So, it's valid to show that there's a relationship from a permitted object (a VLAN, in this example), to a non-permitted object (the prefix).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5185