[PR #15978] [MERGED] Fixes #15977: Hide all admin menu items for non-authenticated users #14743

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15978
Author: @jeremystretch
Created: 5/6/2024
Status: Merged
Merged: 5/7/2024
Merged by: @jeremystretch

Base: developHead: 15977-hide-admin-menu-items


📝 Commits (2)

  • a4789ba Fixes #15977: Hide all admin menu items for non-authenticated users
  • 5e86b8f Account for absence of auth_required on PluginMenuItem

📊 Changes

3 files changed (+12 additions, -2 deletions)

View changed files

📝 netbox/netbox/navigation/__init__.py (+1 -0)
📝 netbox/netbox/navigation/menu.py (+9 -2)
📝 netbox/utilities/templatetags/navigation.py (+2 -0)

📄 Description

Fixes: #15977

  • Extend PluginMenuItem with auth_required boolean attribute & enforce when rendering the navigation menu
  • Set auth_required=True on all menu items under the admin group as a sanity check

🔄 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/15978 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 5/6/2024 **Status:** ✅ Merged **Merged:** 5/7/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `15977-hide-admin-menu-items` --- ### 📝 Commits (2) - [`a4789ba`](https://github.com/netbox-community/netbox/commit/a4789ba9c74c7f038c769b8b228306f8331e5b39) Fixes #15977: Hide all admin menu items for non-authenticated users - [`5e86b8f`](https://github.com/netbox-community/netbox/commit/5e86b8f63457b5cc6ee6fbb9c21b245322907343) Account for absence of auth_required on PluginMenuItem ### 📊 Changes **3 files changed** (+12 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `netbox/netbox/navigation/__init__.py` (+1 -0) 📝 `netbox/netbox/navigation/menu.py` (+9 -2) 📝 `netbox/utilities/templatetags/navigation.py` (+2 -0) </details> ### 📄 Description ### Fixes: #15977 - Extend PluginMenuItem with `auth_required` boolean attribute & enforce when rendering the navigation menu - Set `auth_required=True` on _all_ menu items under the admin group as a sanity check --- <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:26:25 +01:00
adam closed this issue 2025-12-29 23:26:25 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14743