Report run API using wrong permission #4951

Closed
opened 2025-12-29 19:22:36 +01:00 by adam · 0 comments
Owner

Originally created by @fpessoanunes on GitHub (May 28, 2021).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v2.11.4

Python version

3.9

Steps to Reproduce

I believe that running reports using API is checking the wrong permission. It's checking if it has "extras.run_script" permission and I believe it would have to check it has "extras.run_report" permission.

110a6d11a5/netbox/extras/api/views.py (L242)

Expected Behavior

if not request.user.has_perm('extras.run_report')

Observed Behavior

if not request.user.has_perm('extras.run_script')

Originally created by @fpessoanunes on GitHub (May 28, 2021). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v2.11.4 ### Python version 3.9 ### Steps to Reproduce I believe that running reports using API is checking the wrong permission. It's checking if it has "extras.run_script" permission and I believe it would have to check it has "extras.run_report" permission. https://github.com/netbox-community/netbox/blob/110a6d11a53c8da2c09abbf7c81dcc354afa4142/netbox/extras/api/views.py#L242 ### Expected Behavior if not request.user.has_perm('extras.run_report') ### Observed Behavior if not request.user.has_perm('extras.run_script')
adam added the type: bugstatus: accepted labels 2025-12-29 19:22:36 +01:00
adam closed this issue 2025-12-29 19:22:36 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4951