[PR #4151] [MERGED] Fixes #4146: Fix SecretRole permissions enforcement #12772

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/4151
Author: @jeremystretch
Created: 2/12/2020
Status: Merged
Merged: 2/12/2020
Merged by: @jeremystretch

Base: developHead: 4146-secretrole-enforcement


📝 Commits (1)

  • 5bf8559 Fixes #4146: Fix SecretRole permissions enforcement

📊 Changes

5 files changed (+47 additions, -16 deletions)

View changed files

📝 docs/release-notes/version-2.7.md (+1 -0)
📝 netbox/secrets/api/views.py (+5 -3)
📝 netbox/secrets/tests/test_api.py (+36 -11)
📝 netbox/templates/secrets/secret_edit.html (+2 -1)
📝 netbox/utilities/testing/utils.py (+3 -1)

📄 Description

Fixes: #4146

  • Enforce evaluation of SecretRole permissions assignment when querying secrets via the REST API
  • Display "unlock" button only if the secret can be decrypted by the current user
  • Add API tests to validate the enforcement of SecretRole permissions

🔄 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/4151 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 2/12/2020 **Status:** ✅ Merged **Merged:** 2/12/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `4146-secretrole-enforcement` --- ### 📝 Commits (1) - [`5bf8559`](https://github.com/netbox-community/netbox/commit/5bf85597ed46a4ce40945c0fc0102cb1327e4776) Fixes #4146: Fix SecretRole permissions enforcement ### 📊 Changes **5 files changed** (+47 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `docs/release-notes/version-2.7.md` (+1 -0) 📝 `netbox/secrets/api/views.py` (+5 -3) 📝 `netbox/secrets/tests/test_api.py` (+36 -11) 📝 `netbox/templates/secrets/secret_edit.html` (+2 -1) 📝 `netbox/utilities/testing/utils.py` (+3 -1) </details> ### 📄 Description ### Fixes: #4146 - Enforce evaluation of SecretRole permissions assignment when querying secrets via the REST API - Display "unlock" button only if the secret can be decrypted by the current user - Add API tests to validate the enforcement of SecretRole permissions --- <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:23:31 +01:00
adam closed this issue 2025-12-29 22:23:31 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12772