mirror of
https://github.com/inventree/InvenTree.git
synced 2026-12-03 04:41:52 +00:00
Remove legacy plugin setting (#13404)
* Remove legacy plugin setting - ENABLE_PLUGINS_NAVIGATION removed - Not supported by modern interface - Now controlled by ENABLE_PLUGINS_INTERFACE - Use UserInterfaceMixin instead * Apply suggestion from @matmair * fix broken playwright test --------- Co-authored-by: Matthias Mair <code@mjmair.com>
This commit is contained in:
1 parent
f2b98ff286
commit
c9c84044af
8 files changed
+5
-18
No files matched your search
@@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Removed
|
||||
|
||||
- [#13404](https://github.com/inventree/InvenTree/pull/13404) Removes the `ENABLE_PLUGINS_NAVIGATION` setting, which had no effect since the legacy user interface was removed. The `NavigationMixin` is retained for compatibility, but its navigation links are not displayed - plugins should use the `get_ui_navigation_items` method of the `UserInterfaceMixin` instead.
|
||||
- [#13369](https://github.com/inventree/InvenTree/pull/13369) Removes settings which have had no effect since the legacy user interface was removed (or were never implemented): `STOCK_SHOW_INSTALLED_ITEMS`, `PART_SHOW_RELATED`, `BARCODE_INPUT_DELAY` and `PLUGIN_UPDATE_CHECK` (global), and `REPORT_INLINE` and `LABEL_INLINE` (user).
|
||||
|
||||
## 1.7.0 - 2026-11.03
|
||||
|
||||
@@ -4,6 +4,9 @@ title: Navigation Mixin
|
||||
|
||||
## NavigationMixin
|
||||
|
||||
!!! warning "Legacy Mixin"
|
||||
The navigation links provided by this mixin are not displayed in the current user interface, and the `ENABLE_PLUGINS_NAVIGATION` setting has been removed. To add custom navigation items to the user interface, use the [UserInterfaceMixin](./ui.md) and implement the `get_ui_navigation_items` method.
|
||||
|
||||
Use the class constant `NAVIGATION` for a array of links that should be added to InvenTrees navigation header.
|
||||
The array must contain at least one dict that at least define a name and a link for each element. The link must be formatted for a URL pattern name lookup - links to external sites are not possible directly. The optional icon must be a class reference to an icon.
|
||||
|
||||
|
||||
@@ -254,7 +254,6 @@ Refer to the [transfer order settings](../stock/transfer_order.md#transfer-order
|
||||
| ---- | ----------- | ------- | ----- |
|
||||
{{ globalsetting("PLUGIN_ON_STARTUP") }}
|
||||
{{ globalsetting("ENABLE_PLUGINS_URL") }}
|
||||
{{ globalsetting("ENABLE_PLUGINS_NAVIGATION") }}
|
||||
{{ globalsetting("ENABLE_PLUGINS_APP") }}
|
||||
{{ globalsetting("ENABLE_PLUGINS_SCHEDULE") }}
|
||||
{{ globalsetting("ENABLE_PLUGINS_EVENTS") }}
|
||||
|
||||
@@ -1255,7 +1255,6 @@ def plugins_disabled_mixins() -> list[dict]:
|
||||
PluginMixinEnum.APP: 'ENABLE_PLUGINS_APP',
|
||||
PluginMixinEnum.EVENTS: 'ENABLE_PLUGINS_EVENTS',
|
||||
PluginMixinEnum.MAIL: 'ENABLE_PLUGINS_MAILS',
|
||||
PluginMixinEnum.NAVIGATION: 'ENABLE_PLUGINS_NAVIGATION',
|
||||
PluginMixinEnum.SCHEDULE: 'ENABLE_PLUGINS_SCHEDULE',
|
||||
PluginMixinEnum.URLS: 'ENABLE_PLUGINS_URL',
|
||||
PluginMixinEnum.USER_INTERFACE: 'ENABLE_PLUGINS_INTERFACE',
|
||||
|
||||
@@ -552,14 +552,6 @@ SYSTEM_SETTINGS: dict[str, InvenTreeSettingsKeyType] = {
|
||||
'after_save': reload_plugin_registry,
|
||||
'flags': [SettingFlag.TOGGLE],
|
||||
},
|
||||
'ENABLE_PLUGINS_NAVIGATION': {
|
||||
'name': _('Enable navigation integration'),
|
||||
'description': _('Enable plugins to integrate into navigation'),
|
||||
'default': False,
|
||||
'validator': bool,
|
||||
'after_save': reload_plugin_registry,
|
||||
'flags': [SettingFlag.TOGGLE],
|
||||
},
|
||||
'ENABLE_PLUGINS_APP': {
|
||||
'name': _('Enable app integration'),
|
||||
'description': _('Enable plugins to add apps'),
|
||||
|
||||
@@ -3772,11 +3772,7 @@ class AdminMessageAPITests(InvenTreeAPITestCase):
|
||||
# The 'sample' plugin makes use of the (gated) URL integration
|
||||
registry.set_plugin_state('sample', True)
|
||||
|
||||
for key in [
|
||||
'ENABLE_PLUGINS_APP',
|
||||
'ENABLE_PLUGINS_NAVIGATION',
|
||||
'ENABLE_PLUGINS_URL',
|
||||
]:
|
||||
for key in ['ENABLE_PLUGINS_APP', 'ENABLE_PLUGINS_URL']:
|
||||
set_global_setting(key, True, None)
|
||||
|
||||
self.assertNotIn('SampleIntegrationPlugin', message()['message'])
|
||||
@@ -3853,7 +3849,6 @@ class AdminMessageAPITests(InvenTreeAPITestCase):
|
||||
'ENABLE_PLUGINS_APP',
|
||||
'ENABLE_PLUGINS_EVENTS',
|
||||
'ENABLE_PLUGINS_MAILS',
|
||||
'ENABLE_PLUGINS_NAVIGATION',
|
||||
'ENABLE_PLUGINS_SCHEDULE',
|
||||
'ENABLE_PLUGINS_URL',
|
||||
'ENABLE_PLUGINS_INTERFACE',
|
||||
|
||||
@@ -1250,7 +1250,6 @@ class PluginsRegistry:
|
||||
'ENABLE_PLUGINS_APP',
|
||||
'ENABLE_PLUGINS_EVENTS',
|
||||
'ENABLE_PLUGINS_INTERFACE',
|
||||
'ENABLE_PLUGINS_NAVIGATION',
|
||||
'ENABLE_PLUGINS_SCHEDULE',
|
||||
'ENABLE_PLUGINS_URL',
|
||||
'ENABLE_PLUGINS_MAILS',
|
||||
|
||||
@@ -24,7 +24,6 @@ export const PLUGIN_SETTINGS_KEYS = [
|
||||
'ENABLE_PLUGINS_EVENTS',
|
||||
'ENABLE_PLUGINS_INTERFACE',
|
||||
'ENABLE_PLUGINS_URL',
|
||||
'ENABLE_PLUGINS_NAVIGATION',
|
||||
'ENABLE_PLUGINS_APP',
|
||||
'ENABLE_PLUGINS_MAILS',
|
||||
'PLUGIN_ON_STARTUP'
|
||||
|
||||
Reference in new issue
Block a user