User permission using a constraint negation? #8756
Replies: 7 comments 2 replies
-
I too would like this. I have the need to hide certain tenants and their things.
…Sent from my iPhone
On 26 Feb 2022, at 18:55, thefreakquency ***@***.***> wrote:
Hey guys,
I would like to find a way to restrict some users (members of a group) to have access to IP information of a single VRF. We have a contract requirement that mandate us to minimize data access only to personnel having a contract specific security clearance.
Looking at https://netbox.readthedocs.io/en/stable/administration/permissions/ , it seems that it does only Django filter() method, which does not contains any negation operator (not equal to, does not contain, does not start with, etc...) . Per my findings, those are included in Django exclude() method.
Is there a way to allow users to see "everything but VRF x?" I seems that I could restrict it, by manually listing all current VRFs, but as the list will grow, the filters would need to be updated. Any ways to somehow negate a constraint in a permission filter?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.
|
Beta Was this translation helpful? Give feedback.
-
This was proposed under #4949. Ultimately, it wasn't pursued both due to a technical hurdle that would need to be overcome, as well as a general inadvisability toward the approach itself (see my comment here). |
Beta Was this translation helpful? Give feedback.
-
Thanks for the explanation @jeremystretch ! In understand the general inadvisability comment but as it it "general" it does not apply everywhere... In our case, we really need to NOT provide access to an element for some users, but whoever is accessing Netbox should see anything else. I was wondering if the following avenue has been explored? As per documentation:
is equivalent to:
Would'nt it be possible to do negate a Q object like this?
In the previous example, Site would not be NYC1 or NYC2, but active and without tenant. If we were to write the following
could Netbox pass the ~ before Q? This seems to me way much easier than trying to leverage |
Beta Was this translation helpful? Give feedback.
-
I would be interested in permissions to limit access so that a tenant can update their own VRF information but not anything else. |
Beta Was this translation helpful? Give feedback.
-
We're also interested in limiting users/groups access to certain objects (tenants, VRFs, sites). |
Beta Was this translation helpful? Give feedback.
-
We would also need this: we have ~4500 devices, ~1500 VMs and ~50 tenants, who are basically the owners of these devices + VMs. We would need some of these tenants to be restricted, some generally available.
Without being able to negate it would be pretty painful to implement such a permission scheme. |
Beta Was this translation helpful? Give feedback.
-
This would be nice to have. There are departments at our org who need to create objects manually, but we also have information synced from an external source to enable automations. We have tens of thousands of of tenants/locations, and being able to blacklist via a tag would let us segregate everything in an ideal way. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey guys,
I would like to find a way to restrict some users (members of a group) to have access to IP information of a single VRF. We have a contract requirement that mandate us to minimize data access only to personnel having a contract specific security clearance.
Looking at https://netbox.readthedocs.io/en/stable/administration/permissions/ , it seems that it does only Django filter() method, which does not contains any negation operator (not equal to, does not contain, does not start with, etc...) . Per my findings, those are included in Django exclude() method.
Is there a way to allow users to see "everything but VRF x?" I seems that I could restrict it, by manually listing all current VRFs, but as the list will grow, the filters would need to be updated. Any ways to somehow negate a constraint in a permission filter?
Beta Was this translation helpful? Give feedback.
All reactions