[PR #14062] [MERGED] Closes #13550: Refactor view action mappings #14306

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

📋 Pull Request Information

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

Base: featureHead: 13550-view-actions


📝 Commits (7)

  • 41cc5e4 Merge actions and action_perms into a single mapping
  • 1bd9272 Update obsolete permission maps
  • edcdcab Update obsolete action lists
  • 01f96c3 Normalize empty permission mappings
  • 9db6921 Cleanup
  • 10324bf Add deprecation warnings
  • 804f227 Introduce DEFAULT_ACTION_PERMISSIONS constant

📊 Changes

7 files changed (+165 additions, -117 deletions)

View changed files

📝 netbox/core/views.py (+7 -2)
📝 netbox/dcim/views.py (+61 -84)
📝 netbox/extras/views.py (+27 -6)
📝 netbox/netbox/constants.py (+9 -0)
📝 netbox/netbox/views/generic/mixins.py (+48 -13)
📝 netbox/tenancy/views.py (+5 -1)
📝 netbox/virtualization/views.py (+8 -11)

📄 Description

Closes: #13550

  • Delete action_perms map from ActionsMixin
  • Convert actions from a tuple to a dictionary mapping
  • Normalize permissions for all actions (every action should require at least one permission)
  • Ensure backward compatibility for plugins

🔄 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/14062 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 10/17/2023 **Status:** ✅ Merged **Merged:** 10/20/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `13550-view-actions` --- ### 📝 Commits (7) - [`41cc5e4`](https://github.com/netbox-community/netbox/commit/41cc5e46af06291f7491155668230c04e7c76969) Merge actions and action_perms into a single mapping - [`1bd9272`](https://github.com/netbox-community/netbox/commit/1bd927250c752920566f9056410cf0ecd7ca8251) Update obsolete permission maps - [`edcdcab`](https://github.com/netbox-community/netbox/commit/edcdcab98f5db7595cb7fd85f85a76e2e35fdc59) Update obsolete action lists - [`01f96c3`](https://github.com/netbox-community/netbox/commit/01f96c3eddca658935a7bbfe5080cd3b36cfe897) Normalize empty permission mappings - [`9db6921`](https://github.com/netbox-community/netbox/commit/9db6921e9007a148b89feba2dcf65d18c318de42) Cleanup - [`10324bf`](https://github.com/netbox-community/netbox/commit/10324bfe6ef182913878f105514966ff89fdbe93) Add deprecation warnings - [`804f227`](https://github.com/netbox-community/netbox/commit/804f22779dca03e6af86be143a9c947b3e099c85) Introduce DEFAULT_ACTION_PERMISSIONS constant ### 📊 Changes **7 files changed** (+165 additions, -117 deletions) <details> <summary>View changed files</summary> 📝 `netbox/core/views.py` (+7 -2) 📝 `netbox/dcim/views.py` (+61 -84) 📝 `netbox/extras/views.py` (+27 -6) 📝 `netbox/netbox/constants.py` (+9 -0) 📝 `netbox/netbox/views/generic/mixins.py` (+48 -13) 📝 `netbox/tenancy/views.py` (+5 -1) 📝 `netbox/virtualization/views.py` (+8 -11) </details> ### 📄 Description ### Closes: #13550 - Delete `action_perms` map from ActionsMixin - Convert `actions` from a tuple to a dictionary mapping - Normalize permissions for all actions (every action should require at least one permission) - Ensure backward compatibility for plugins --- <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:43 +01:00
adam closed this issue 2025-12-29 23:23:43 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14306