Skip to content

query_filters: how to filter on a contact (name) of a tenant #1424

Answered by FOTempel
FOTempel asked this question in Q&A
Discussion options

You must be logged in to vote

Someone will be looking for this, so here's an answer. The secret lies in the permissions in Netbox, not in the query filters in the dynamic inventory: Add a permission for the user to view virtual machines and add a constraint to it like so:

{
  "tenant__contacts__contact__name":"<some_contact_name>"
}

For more information Netbox constrains, see:
https://netboxlabs.com/docs/netbox/administration/permissions/#constraints
and: https://www.packetcoders.io/mastering-nextbox-user-access-with-permission-constraints/

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by FOTempel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant