mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Add customize option to hide admin link in user menu
This commit is contained in:
parent
bb5734d1ef
commit
4a843908ec
@ -915,7 +915,7 @@ PLUGIN_TESTING_SETUP = get_setting('PLUGIN_TESTING_SETUP', False) # load plugin
|
|||||||
PLUGIN_RETRY = get_setting('PLUGIN_RETRY', 5) # how often should plugin loading be tried?
|
PLUGIN_RETRY = get_setting('PLUGIN_RETRY', 5) # how often should plugin loading be tried?
|
||||||
PLUGIN_FILE_CHECKED = False # Was the plugin file checked?
|
PLUGIN_FILE_CHECKED = False # Was the plugin file checked?
|
||||||
|
|
||||||
# user interface customization values
|
# User interface customization values
|
||||||
CUSTOMIZE = get_setting(
|
CUSTOMIZE = get_setting(
|
||||||
'INVENTREE_CUSTOMIZE',
|
'INVENTREE_CUSTOMIZE',
|
||||||
CONFIG.get('customize', {}),
|
CONFIG.get('customize', {}),
|
||||||
|
@ -193,3 +193,4 @@ static_root: '/home/inventree/data/static'
|
|||||||
# login_message: InvenTree demo instance - <a href='https://inventree.readthedocs.io/en/latest/demo/'> Click here for login details</a>
|
# login_message: InvenTree demo instance - <a href='https://inventree.readthedocs.io/en/latest/demo/'> Click here for login details</a>
|
||||||
# navbar_message: <h6>InvenTree demo mode <a href='https://inventree.readthedocs.io/en/latest/demo/'><span class='fas fa-info-circle'></span></a></h6>
|
# navbar_message: <h6>InvenTree demo mode <a href='https://inventree.readthedocs.io/en/latest/demo/'><span class='fas fa-info-circle'></span></a></h6>
|
||||||
# logo: logo.png
|
# logo: logo.png
|
||||||
|
# hide_admin_link: true
|
||||||
|
@ -6,9 +6,10 @@
|
|||||||
{% settings_value 'BARCODE_ENABLE' as barcodes %}
|
{% settings_value 'BARCODE_ENABLE' as barcodes %}
|
||||||
{% settings_value 'STICKY_HEADER' user=request.user as sticky %}
|
{% settings_value 'STICKY_HEADER' user=request.user as sticky %}
|
||||||
{% navigation_enabled as plugin_nav %}
|
{% navigation_enabled as plugin_nav %}
|
||||||
{% inventree_demo_mode as demo %}
|
|
||||||
{% inventree_show_about user as show_about %}
|
{% inventree_show_about user as show_about %}
|
||||||
{% inventree_customize 'navbar_message' as navbar_message %}
|
{% inventree_customize 'navbar_message' as navbar_message %}
|
||||||
|
{% inventree_customize 'hide_admin_link' as hide_admin_link %}
|
||||||
|
|
||||||
<nav class="navbar {% if sticky %}fixed-top{% endif %} navbar-expand-lg navbar-light">
|
<nav class="navbar {% if sticky %}fixed-top{% endif %} navbar-expand-lg navbar-light">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
@ -132,7 +133,7 @@
|
|||||||
</a>
|
</a>
|
||||||
<ul class='dropdown-menu dropdown-menu-end inventree-navbar-menu'>
|
<ul class='dropdown-menu dropdown-menu-end inventree-navbar-menu'>
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
{% if user.is_staff and not demo %}
|
{% if user.is_staff and not hide_admin_link %}
|
||||||
<li><a class='dropdown-item' href="{% url 'admin:index' %}"><span class="fas fa-user-shield"></span> {% trans "Admin" %}</a></li>
|
<li><a class='dropdown-item' href="{% url 'admin:index' %}"><span class="fas fa-user-shield"></span> {% trans "Admin" %}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li><a class='dropdown-item' href="{% url 'settings' %}"><span class="fas fa-cog"></span> {% trans "Settings" %}</a></li>
|
<li><a class='dropdown-item' href="{% url 'settings' %}"><span class="fas fa-cog"></span> {% trans "Settings" %}</a></li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user