Creating Permissions for IPAddress with Assigned Device Tag Constraint #15430
Unanswered
Kani999
asked this question in
Help Wanted!
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In NetBox, setting up permission constraints is crucial for managing access effectively. While it's straightforward to create permission constraints for certain fields like vid, configuring constraints for more complex relationships such as those involving IP addresses and assigned devices with specific tags can be challenging.
Currently, attempting to create a constraint for ipam.IPAddress with a condition like
{"assigned_object__device__tags__name": "netop"}
results in an error:This error indicates that direct querying on the assigned_object field is not supported due to the lack of an automatic reverse relation. Consequently, applying constraints based on the tags associated with assigned devices becomes non-trivial.
Our discussion aims to explore potential solutions or workarounds for this issue. Do you have any insights or examples on how to create permissions for IPAddress with constraints, particularly for accessing IP addresses associated with devices tagged as "Netop"? Let's collaborate and find a viable approach to address this challenge.
Beta Was this translation helpful? Give feedback.
All reactions