[PR #20871] [MERGED] Fixes #20649: Enforce view permissions on REST API endpoint for custom scripts #16075

Closed
opened 2025-12-30 00:25:39 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/20871
Author: @jeremystretch
Created: 11/24/2025
Status: Merged
Merged: 11/25/2025
Merged by: @jnovinger

Base: mainHead: 20649-script-permissions


📝 Commits (1)

  • 257e4af Fixes #20649: Enforce view permissions on REST API endpoint for custom scripts

📊 Changes

2 files changed (+10 additions, -7 deletions)

View changed files

📝 netbox/extras/api/views.py (+8 -0)
📝 netbox/extras/tests/test_api.py (+2 -7)

📄 Description

Fixes: #20649

Override initial() on ScriptViewSet to call restrict() on the queryset


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/20871 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 11/24/2025 **Status:** ✅ Merged **Merged:** 11/25/2025 **Merged by:** [@jnovinger](https://github.com/jnovinger) **Base:** `main` ← **Head:** `20649-script-permissions` --- ### 📝 Commits (1) - [`257e4af`](https://github.com/netbox-community/netbox/commit/257e4afbdaed21c7cbf8e740b3c15be9634c7ae3) Fixes #20649: Enforce view permissions on REST API endpoint for custom scripts ### 📊 Changes **2 files changed** (+10 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/api/views.py` (+8 -0) 📝 `netbox/extras/tests/test_api.py` (+2 -7) </details> ### 📄 Description ### Fixes: #20649 Override `initial()` on ScriptViewSet to call `restrict()` on the queryset --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:25:39 +01:00
adam closed this issue 2025-12-30 00:25:39 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#16075