Users can only see Custom scripts allowed based on Permissions #11258

Closed
opened 2025-12-29 21:42:35 +01:00 by adam · 4 comments
Owner

Originally created by @AaronJamesMyers on GitHub (Jun 4, 2025).

NetBox version

4.1.10

Feature type

New functionality

Proposed functionality

Being able to filter which scripts a user can see based on their permissions/permission groups

Use case

We have scripts created to create numerous types of devices, and each device has its own requirements and is managed by a seperate group.

for example. someone who works to install Wireless equipment has a certain set of scripts. A person who installs transport equipment has another set of scripts. Someone in the NOC has another set of scripts.

We have implemented permissions to run those scripts outside of Netbox. but even if a user can't run the script they can still see it. The main issue is that any user may only need a handful of scripts, but they may need to scroll through dozens of scripts to find the small subset of scripts that their group uses/has access to.

Database changes

I dont think DB changes are necessary(I THINK there is a db entry for scripts now?)

External dependencies

No response

Revisions:
Im not exactly sure how it would work, but my thought would be that you create a permission group called "WIRELESS PROVISIONERS" then you add that permission to users A, B, and C.

Then only people in the 'WIRELESS PROVISIONERS" group will be able to see script 1,2,and 6. in the script_list view.

Or Maybe it could be added as a permission. I tried adding this as a JSON in a "permission" but it didnt work.

so you would have a permission that would say have "view/run" access to script_id 10,15,20. then you apply that permission to a group. then anyone in that group would be able to ONLY view scripts with id 10,15,20.

Originally created by @AaronJamesMyers on GitHub (Jun 4, 2025). ### NetBox version 4.1.10 ### Feature type New functionality ### Proposed functionality Being able to filter which scripts a user can see based on their permissions/permission groups ### Use case We have scripts created to create numerous types of devices, and each device has its own requirements and is managed by a seperate group. for example. someone who works to install Wireless equipment has a certain set of scripts. A person who installs transport equipment has another set of scripts. Someone in the NOC has another set of scripts. We have implemented permissions to run those scripts outside of Netbox. but even if a user can't run the script they can still see it. The main issue is that any user may only need a handful of scripts, but they may need to scroll through dozens of scripts to find the small subset of scripts that their group uses/has access to. ### Database changes I dont think DB changes are necessary(I THINK there is a db entry for scripts now?) ### External dependencies _No response_ Revisions: Im not exactly sure how it would work, but my thought would be that you create a permission group called "WIRELESS PROVISIONERS" then you add that permission to users A, B, and C. Then only people in the 'WIRELESS PROVISIONERS" group will be able to see script 1,2,and 6. in the script_list view. Or Maybe it could be added as a permission. I tried adding this as a JSON in a "permission" but it didnt work. so you would have a permission that would say have "view/run" access to script_id 10,15,20. then you apply that permission to a group. then anyone in that group would be able to ONLY view scripts with id 10,15,20.
adam added the type: featurepending closurestatus: revisions needed labels 2025-12-29 21:42:35 +01:00
adam closed this issue 2025-12-29 21:42:35 +01:00
Author
Owner

@jnovinger commented on GitHub (Jun 5, 2025):

@AaronJamesMyers , this is an interesting idea, but the information you have provided does not constitute an actionable feature request. How would this be implemented?

Per our contributing guide, a feature request must include a thorough description of the proposed functionality, including any database changes, new views or API endpoints, and so on. If you would like to elaborate on your proposal, please modify your post above. If sufficient detail is not added, this issue will be closed.

@jnovinger commented on GitHub (Jun 5, 2025): @AaronJamesMyers , this is an interesting idea, but the information you have provided does not constitute an actionable feature request. How would this be implemented? Per our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md), a feature request must include a thorough description of the proposed functionality, including any database changes, new views or API endpoints, and so on. If you would like to elaborate on your proposal, please modify your post above. If sufficient detail is not added, this issue will be closed.
Author
Owner

@AaronJamesMyers commented on GitHub (Jun 6, 2025):

Im not exactly sure how it would work, but my thought would be that you create a permission group called "WIRELESS PROVISIONERS" then you add that permission to users A, B, and C.

Then only people in the 'WIRELESS PROVISIONERS" group will be able to see script 1,2,and 6. in the script_list view.

Or Maybe it could be added as a permission. I tried adding this as a JSON in a "permission" but it didnt work.

so you would have a permission that would say have "view/run" access to script_id 10,15,20. then you apply that permission to a group. then anyone in that group would be able to ONLY view scripts with id 10,15,20.

@AaronJamesMyers commented on GitHub (Jun 6, 2025): Im not exactly sure how it would work, but my thought would be that you create a permission group called "WIRELESS PROVISIONERS" then you add that permission to users A, B, and C. Then only people in the 'WIRELESS PROVISIONERS" group will be able to see script 1,2,and 6. in the script_list view. Or Maybe it could be added as a permission. I tried adding this as a JSON in a "permission" but it didnt work. so you would have a permission that would say have "view/run" access to script_id 10,15,20. then you apply that permission to a group. then anyone in that group would be able to ONLY view scripts with id 10,15,20.
Author
Owner

@github-actions[bot] commented on GitHub (Jun 13, 2025):

This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.

@github-actions[bot] commented on GitHub (Jun 13, 2025): This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.
Author
Owner

@github-actions[bot] commented on GitHub (Jun 21, 2025):

This issue is being closed as no further information has been provided. If you would like to revisit this topic, please first modify your original post to include all the requested detail, and then ask that the issue be reopened.

@github-actions[bot] commented on GitHub (Jun 21, 2025): This issue is being closed as no further information has been provided. If you would like to revisit this topic, please first modify your original post to include all the requested detail, and then ask that the issue be reopened.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11258