Conversation
Fixes #104. Setting PLUGINS_CONFIG['netbox_floorplan']['top_level_menu'] = True registers a dedicated top-level "Floorplan" menu instead of nesting "Floorplan Images" under NetBox's shared "Plugins" menu. Defaults to False, preserving current behaviour. This is a deliberate exception to the plugin's previous no-settings convention (AGENTS.md updated accordingly). Verified against the live NetBox 4.7.1 stack in netbox-docker: default nesting is unchanged, and enabling the setting renders the dedicated top-level menu correctly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Fixes #94. FloorplanMapEditView inherited LoginRequiredMixin instead of PermissionRequiredMixin, so its permission_required attribute was never consulted, and it referenced a permission codename, edit_floorplan, that doesn't exist. Any logged-in user, including one with only view permission, could open the drag-and-drop editor. The view now requires netbox_floorplan.change_floorplan. The Add, Edit and Delete Floorplan buttons on the site/location tab are also hidden unless the viewer holds the corresponding permission, instead of rendering unconditionally. Saving and deleting were already enforced correctly server-side via the REST API and NetBox's generic delete view; this closes the gap that let an unauthorized user reach the editor UI at all. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #107 (merged before this commit landed on
feature).Fixes #104: setting
PLUGINS_CONFIG['netbox_floorplan']['top_level_menu'] = Trueregisters a dedicated top-level "Floorplan" menu instead of nesting "Floorplan Images" under NetBox's shared "Plugins" menu. Defaults toFalse, preserving current behaviour.Fixes #94:
FloorplanMapEditViewinheritedLoginRequiredMixininstead ofPermissionRequiredMixinand referenced a nonexistent permission codename, so any logged-in user — including one with only view permission — could open the canvas editor. It now requireschange_floorplan, and the Add/Edit/Delete Floorplan buttons on the site/location tab are hidden without the corresponding permission.Verified against the live NetBox 4.7.1 stack in netbox-docker: default menu nesting unchanged, dedicated top-level menu renders correctly when enabled, full test suite passing (178/178).
🤖 Generated with Claude Code