[PR #14097] [MERGED] Closes #10244: Protection rules #14315

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/14097
Author: @jeremystretch
Created: 10/20/2023
Status: Merged
Merged: 10/30/2023
Merged by: @jeremystretch

Base: featureHead: 10244-protection-rules


📝 Commits (1)

📊 Changes

8 files changed (+183 additions, -13 deletions)

View changed files

📝 docs/configuration/data-validation.md (+21 -0)
📝 docs/customization/custom-validation.md (+2 -0)
📝 netbox/extras/forms/model_forms.py (+2 -1)
📝 netbox/extras/signals.py (+26 -5)
📝 netbox/extras/tests/test_customvalidation.py (+89 -1)
📝 netbox/extras/validators.py (+28 -3)
📝 netbox/netbox/config/parameters.py (+11 -3)
📝 netbox/templates/extras/configrevision.html (+4 -0)

📄 Description

Closes: #10244

  • Introduce the PROTECTION_RULES configuration parameter
  • Refactor the run_custom_validators() signal handler into separate handlers for post_clean and pre_delete
  • Raise AbortRequest when pre-delete validation fails
  • Introduce eq (equal to) and neq (not equal to) validators

🔄 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/14097 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 10/20/2023 **Status:** ✅ Merged **Merged:** 10/30/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `10244-protection-rules` --- ### 📝 Commits (1) - [`0665286`](https://github.com/netbox-community/netbox/commit/06652868c1e4dbf794b9437c6e6dd507ef9b6be8) Initial work on #10244: Protection rules ### 📊 Changes **8 files changed** (+183 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `docs/configuration/data-validation.md` (+21 -0) 📝 `docs/customization/custom-validation.md` (+2 -0) 📝 `netbox/extras/forms/model_forms.py` (+2 -1) 📝 `netbox/extras/signals.py` (+26 -5) 📝 `netbox/extras/tests/test_customvalidation.py` (+89 -1) 📝 `netbox/extras/validators.py` (+28 -3) 📝 `netbox/netbox/config/parameters.py` (+11 -3) 📝 `netbox/templates/extras/configrevision.html` (+4 -0) </details> ### 📄 Description ### Closes: #10244 - Introduce the `PROTECTION_RULES` configuration parameter - Refactor the `run_custom_validators()` signal handler into separate handlers for `post_clean` and `pre_delete` - Raise `AbortRequest` when pre-delete validation fails - Introduce `eq` (equal to) and `neq` (not equal to) validators --- <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:23:46 +01:00
adam closed this issue 2025-12-29 23:23:46 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14315