mirror of
https://github.com/inventree/InvenTree.git
synced 2026-02-06 13:25:53 +00:00
feat(frontend): disable_theme_storage (#11208)
* feat(frontend): disable_theme_storage * bump API version * fix access pattern
This commit is contained in:
@@ -34,7 +34,7 @@ from plugin.serializers import MetadataSerializer
|
||||
from users.models import ApiToken
|
||||
from users.permissions import check_user_permission, prefetch_rule_sets
|
||||
|
||||
from .helpers import plugins_info
|
||||
from .helpers import plugins_info, str2bool
|
||||
from .helpers_email import is_email_configured
|
||||
from .mixins import ListAPI, RetrieveUpdateAPI
|
||||
from .status import check_system_health, is_worker_running
|
||||
@@ -238,6 +238,7 @@ class InfoApiSerializer(serializers.Serializer):
|
||||
splash = serializers.CharField()
|
||||
login_message = serializers.CharField(allow_null=True)
|
||||
navbar_message = serializers.CharField(allow_null=True)
|
||||
disable_theme_storage = serializers.BooleanField(default=False)
|
||||
|
||||
server = serializers.CharField(read_only=True)
|
||||
id = serializers.CharField(read_only=True, allow_null=True)
|
||||
@@ -310,6 +311,9 @@ class InfoView(APIView):
|
||||
'splash': helpers.getSplashScreen(),
|
||||
'login_message': helpers.getCustomOption('login_message'),
|
||||
'navbar_message': helpers.getCustomOption('navbar_message'),
|
||||
'disable_theme_storage': str2bool(
|
||||
helpers.getCustomOption('disable_theme_storage')
|
||||
),
|
||||
},
|
||||
'active_plugins': plugins_info(),
|
||||
# Following fields are only available to staff users
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
"""InvenTree API version information."""
|
||||
|
||||
# InvenTree API version
|
||||
INVENTREE_API_VERSION = 443
|
||||
INVENTREE_API_VERSION = 444
|
||||
"""Increment this API version number whenever there is a significant change to the API that any clients need to know about."""
|
||||
|
||||
INVENTREE_API_TEXT = """
|
||||
|
||||
v444 -> 2026-01-27 : https://github.com/inventree/InvenTree/pull/11208
|
||||
- Add customize option to disable theme loading from user profile (mainly for demo site use)
|
||||
|
||||
v443 -> 2026-01-21 : https://github.com/inventree/InvenTree/pull/11177
|
||||
- Adds IPN ordering option for BomItem API endpoint
|
||||
- Adds IPN ordering option for BuildLine API endpoint
|
||||
|
||||
@@ -227,6 +227,7 @@ ldap:
|
||||
# navbar_message: <h6>InvenTree demo mode <a href='https://inventree.org/demo.html'><span class='fas fa-info-circle'></span></a></h6>
|
||||
# hide_admin_link: true
|
||||
# hide_password_reset: true
|
||||
# disable_theme_storage: true
|
||||
# logo: img/custom_logo.png
|
||||
# splash: img/custom_splash.jpg
|
||||
|
||||
|
||||
Reference in New Issue
Block a user