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:
@ -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 """
|
||||
|
Reference in New Issue
Block a user