sidebar still shows menu entries of disabled plugins
Current behavior: ResourceServiceImpl#getMenuTree builds the sidebar menu from the resource table only (filtering out super-admin-only perms), without checking the plugin enabled status. Plugin menu resources are auto-created when a plugin is registered (onPluginCreated), and remain visible after the plugin is disabled in the plugin list.
Impact: users click into a disabled plugin's selector/rule page and see an empty or unusable configuration page; the sidebar does not reflect the actual plugin state.
Possible directions (for discussion):
- Admin-side: filter plugin menu resources by the plugin
enabledstatus when building the menu tree (or sync a hidden flag on plugin enable/disable events); - Dashboard-side: filter plugin submenus according to the plugin list status;
- Alternative: render disabled-plugin menus greyed-out with a "plugin disabled" tooltip, keeping the entry point discoverable.
Asking for the maintainer's preferred direction - happy to implement whichever is chosen.
Implemented the fix for #8473. PR:https://github.com/apache/shenyu/pull/8494
The sidebar now hides menu entries belonging to disabled plugins, including their nested child resources.
The implementation:
- Checks plugin enablement status when building the menu tree.
- Filters out disabled plugin resources and their descendants.
- Preserves existing resource records in the database.
- Automatically restores menu visibility when a plugin is enabled again.
Added unit tests covering disabled plugins, enabled plugins, and menu restoration after re-enablement.
Testing:
ResourceServiceTest: 16 tests passed, 0 failures, 0 errors.git diff --check: Passed.
Thank you for reviewing my contribution!