[PR #15704] [MERGED] 15582 check permissions on specific object when sync request #14649

Closed
opened 2025-12-29 23:25:44 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15704
Author: @arthanson
Created: 4/11/2024
Status: Merged
Merged: 4/17/2024
Merged by: @jeremystretch

Base: developHead: 15582-sync-perm


📝 Commits (3)

  • 1449cda 15582 check permissions on specific object when sync request
  • 3f19be8 15582 move permission check
  • 7fcb28b Enable translation of error message

📊 Changes

1 file changed (+5 additions, -4 deletions)

View changed files

📝 netbox/core/api/views.py (+5 -4)

📄 Description

Fixes: #15582

Check permissions on specific object when sync request. I kept the original permission check as that is before the object is loaded and the get_object_or_404 can return 404 if the object doesn't exist and the user doesn't have sync permission which is a security edge case of showing which ones exist.

Once the object is actually loaded it needs to be re-checked in case there are constraints or perms tied to the specific object.


🔄 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/15704 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 4/11/2024 **Status:** ✅ Merged **Merged:** 4/17/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `15582-sync-perm` --- ### 📝 Commits (3) - [`1449cda`](https://github.com/netbox-community/netbox/commit/1449cda390f5488b51ac3699c3c6a4f2d8e9cdd0) 15582 check permissions on specific object when sync request - [`3f19be8`](https://github.com/netbox-community/netbox/commit/3f19be86078e6c6ffcfa552792263bbc362e39ac) 15582 move permission check - [`7fcb28b`](https://github.com/netbox-community/netbox/commit/7fcb28b60b3fefacd539f422f014e323dfc04e03) Enable translation of error message ### 📊 Changes **1 file changed** (+5 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `netbox/core/api/views.py` (+5 -4) </details> ### 📄 Description ### Fixes: #15582 Check permissions on specific object when sync request. I kept the original permission check as that is before the object is loaded and the get_object_or_404 can return 404 if the object doesn't exist and the user doesn't have sync permission which is a security edge case of showing which ones exist. Once the object is actually loaded it needs to be re-checked in case there are constraints or perms tied to the specific object. --- <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 23:25:44 +01:00
adam closed this issue 2025-12-29 23:25:45 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14649