2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 21:15:41 +00:00

make it possible to resitrict the about modal

This commit is contained in:
Matthias
2022-04-24 01:02:41 +02:00
parent ff9d8e7b6b
commit 1127bf2497
5 changed files with 21 additions and 1 deletions

View File

@ -166,6 +166,14 @@ def inventree_demo_mode(*args, **kwargs):
return djangosettings.DEMO_MODE
@register.simple_tag()
def inventree_show_about(user, *args, **kwargs):
""" Return True if the about modal should be shown """
if InvenTreeSetting.get_setting('INVENTREE_RESTRICT_ABOUT') and not user.is_superuser:
return False
return True
@register.simple_tag()
def inventree_docker_mode(*args, **kwargs):
""" Return True if the server is running as a Docker image """