[PR #13639] [MERGED] Closes #13638: Add optional staff_only attribute to MenuItem #14227

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/13639
Author: @jeremystretch
Created: 8/31/2023
Status: Merged
Merged: 8/31/2023
Merged by: @jeremystretch

Base: developHead: 13638-menuitem-staff-only


📝 Commits (3)

📊 Changes

4 files changed (+20 additions, -12 deletions)

View changed files

📝 docs/plugins/development/navigation.md (+9 -6)
📝 netbox/extras/plugins/navigation.py (+2 -1)
📝 netbox/netbox/navigation/__init__.py (+1 -0)
📝 netbox/utilities/templatetags/navigation.py (+8 -5)

📄 Description

Fixes: #13638

  • Add optional staff_only boolean attribute to MenuItem dataclass
  • Modify menu rendering logic to evaluate staff_only against user's is_staff status

🔄 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/13639 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 8/31/2023 **Status:** ✅ Merged **Merged:** 8/31/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `13638-menuitem-staff-only` --- ### 📝 Commits (3) - [`d0b1fac`](https://github.com/netbox-community/netbox/commit/d0b1facfd8181b61f6eca98b7092544e167bcdb4) Closes #13638: Add optional staff_only attribute to MenuItem - [`b23f7b7`](https://github.com/netbox-community/netbox/commit/b23f7b76547297ea8d960648f02a6fd6adfd7295) Add missing file - [`b7decfa`](https://github.com/netbox-community/netbox/commit/b7decfaa7e34b83d044f68107dedcb1caa3ed864) Add release note ### 📊 Changes **4 files changed** (+20 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `docs/plugins/development/navigation.md` (+9 -6) 📝 `netbox/extras/plugins/navigation.py` (+2 -1) 📝 `netbox/netbox/navigation/__init__.py` (+1 -0) 📝 `netbox/utilities/templatetags/navigation.py` (+8 -5) </details> ### 📄 Description ### Fixes: #13638 - Add optional `staff_only` boolean attribute to MenuItem dataclass - Modify menu rendering logic to evaluate `staff_only` against user's `is_staff` status --- <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:17 +01:00
adam closed this issue 2025-12-29 23:23:17 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14227