[PR #8039] [MERGED] Fixes #5869: Fix permissions evaluation under available prefix/IP REST API endpoints #13308

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/8039
Author: @jeremystretch
Created: 12/10/2021
Status: Merged
Merged: 12/10/2021
Merged by: @jeremystretch

Base: developHead: 5869-available-prefixes


📝 Commits (6)

📊 Changes

6 files changed (+240 additions, -255 deletions)

View changed files

📝 docs/release-notes/version-3.1.md (+1 -0)
netbox/ipam/api/mixins.py (+0 -185)
📝 netbox/ipam/api/urls.py (+23 -1)
📝 netbox/ipam/api/views.py (+197 -53)
📝 netbox/ipam/tests/test_api.py (+1 -1)
📝 netbox/netbox/api/views.py (+18 -15)

📄 Description

Fixes: #5869

This moves the available-prefixes and available-ips REST API endpoints out of the Prefix and IPRange model viewsets into standalone views, which allows for proper permissions resolution.


🔄 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/8039 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 12/10/2021 **Status:** ✅ Merged **Merged:** 12/10/2021 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `5869-available-prefixes` --- ### 📝 Commits (6) - [`ef5bbdb`](https://github.com/netbox-community/netbox/commit/ef5bbdb1e24ec114f7718414510db11f2953b1b2) Move available prefixes endpoint to its own view - [`35eabc0`](https://github.com/netbox-community/netbox/commit/35eabc0353f282a6ed56690dc13570ae5df136b2) Move available IPs endpoints to separate views - [`661b3c4`](https://github.com/netbox-community/netbox/commit/661b3c4bfbe4b9898366b45171240590b124434c) Fix queryset restrictions - [`91fe158`](https://github.com/netbox-community/netbox/commit/91fe158c263b9e0a485a7c35a3ed3c9973d7b163) Restore endpoint schema documentation - [`08de6c3`](https://github.com/netbox-community/netbox/commit/08de6c32c94d62d0bf46d78ef31e8d829cb4838e) Changelog for #5869 - [`d850b3a`](https://github.com/netbox-community/netbox/commit/d850b3ac7eefeb5e70b4941cde3d408c5338dfde) Fix available prefix creation test ### 📊 Changes **6 files changed** (+240 additions, -255 deletions) <details> <summary>View changed files</summary> 📝 `docs/release-notes/version-3.1.md` (+1 -0) ➖ `netbox/ipam/api/mixins.py` (+0 -185) 📝 `netbox/ipam/api/urls.py` (+23 -1) 📝 `netbox/ipam/api/views.py` (+197 -53) 📝 `netbox/ipam/tests/test_api.py` (+1 -1) 📝 `netbox/netbox/api/views.py` (+18 -15) </details> ### 📄 Description ### Fixes: #5869 This moves the `available-prefixes` and `available-ips` REST API endpoints out of the Prefix and IPRange model viewsets into standalone views, which allows for proper permissions resolution. --- <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-29 22:26:41 +01:00
adam closed this issue 2025-12-29 22:26:41 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13308