Permission template or permission constraints variables #4715

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

Originally created by @hyudra on GitHub (Apr 1, 2021).

NetBox version

v2.10.4

Feature type

New functionality

Proposed functionality

With new function introduced on v2.9, the permission is very flexible to using but very complicate to setup with constraints. Because constraints field need to exist on each models it's assigned to.

Currently, I have to create around 15 permissions per tenant users group. With constraints like virtual_machine__tenant__name , tenant__name , site__tenant__name, etc. Which very frustrate to create with multiple tenant. As permissions do not have function for export and import.

What I'd like is to have variables to use groups. e.g. $tenant = "CustomerA". Then on each permission I just need to set constraints as {"tenant__name" : $tenant }. This will reduce the creation of very same permission but different constraints value.

Use case

Netbox admin that control multiple tenants can control permission easier and more clean.

Database changes

Maybe need to add fields to User groups as json.

External dependencies

Maybe not.

Originally created by @hyudra on GitHub (Apr 1, 2021). ### NetBox version v2.10.4 ### Feature type New functionality ### Proposed functionality With new function introduced on v2.9, the permission is very flexible to using but very complicate to setup with constraints. Because constraints field need to exist on each models it's assigned to. Currently, I have to create around 15 permissions per tenant users group. With constraints like virtual_machine__tenant__name , tenant__name , site__tenant__name, etc. Which very frustrate to create with multiple tenant. As permissions do not have function for export and import. What I'd like is to have variables to use groups. e.g. $tenant = "CustomerA". Then on each permission I just need to set constraints as {"tenant__name" : $tenant }. This will reduce the creation of very same permission but different constraints value. ### Use case Netbox admin that control multiple tenants can control permission easier and more clean. ### Database changes Maybe need to add fields to User groups as json. ### External dependencies Maybe not.
adam added the type: featurepending closure labels 2025-12-29 19:19:48 +01:00
adam closed this issue 2025-12-29 19:19:49 +01:00
Author
Owner

@github-actions[bot] commented on GitHub (Jun 1, 2021):

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 on GitHub (Jun 1, 2021): 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](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Jul 2, 2021):

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.

@github-actions[bot] commented on GitHub (Jul 2, 2021): 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4715