mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #6502: Correct permissions evaluation for running a report via the REST API
This commit is contained in:
@ -8,6 +8,10 @@
|
|||||||
* [#6487](https://github.com/netbox-community/netbox/issues/6487) - Add location filter to cable connection form
|
* [#6487](https://github.com/netbox-community/netbox/issues/6487) - Add location filter to cable connection form
|
||||||
* [#6501](https://github.com/netbox-community/netbox/issues/6501) - Expose prefix depth and children on REST API serializer
|
* [#6501](https://github.com/netbox-community/netbox/issues/6501) - Expose prefix depth and children on REST API serializer
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* [#6502](https://github.com/netbox-community/netbox/issues/6502) - Correct permissions evaluation for running a report via the REST API
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## v2.11.4 (2021-05-25)
|
## v2.11.4 (2021-05-25)
|
||||||
|
@ -239,7 +239,7 @@ class ReportViewSet(ViewSet):
|
|||||||
Run a Report identified as "<module>.<script>" and return the pending JobResult as the result
|
Run a Report identified as "<module>.<script>" and return the pending JobResult as the result
|
||||||
"""
|
"""
|
||||||
# Check that the user has permission to run reports.
|
# Check that the user has permission to run reports.
|
||||||
if not request.user.has_perm('extras.run_script'):
|
if not request.user.has_perm('extras.run_report'):
|
||||||
raise PermissionDenied("This user does not have permission to run reports.")
|
raise PermissionDenied("This user does not have permission to run reports.")
|
||||||
|
|
||||||
# Check that at least one RQ worker is running
|
# Check that at least one RQ worker is running
|
||||||
|
Reference in New Issue
Block a user