1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #12325: Disable the Django admin UI by default (#15008)

* Disable the Django admin UI by default

* Remove outdated references to the admin UI

* Update tests
This commit is contained in:
Jeremy Stretch
2024-02-05 11:44:52 -05:00
committed by GitHub
parent 93b77cb4f0
commit 5d9311eecf
19 changed files with 67 additions and 34 deletions

View File

@@ -38,7 +38,7 @@
<td>{% checkmark request.user.is_superuser %}</td>
</tr>
<tr>
<th scope="row">{% trans "Admin Access" %}</th>
<th scope="row">{% trans "Staff" %}</th>
<td>{% checkmark request.user.is_staff %}</td>
</tr>
</table>

View File

@@ -45,7 +45,11 @@
<td>{{ param }}</td>
<td>{{ current }}</td>
<td>{{ new }}</td>
<td>{% if current != new %}<img src="{% static 'admin/img/icon-changelink.svg' %}" alt="*" title="{% trans "Changed" %}">{% endif %}</td>
<td>
{% if current != new %}
<i class="mdi mdi-pencil text-warning" title="{% trans "Changed" %}"></i>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>

View File

@@ -9,9 +9,9 @@
</div>
</a>
<div class="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
{% if request.user.is_staff %}
{% if config.DJANGO_ADMIN_ENABLED and request.user.is_staff %}
<a class="dropdown-item" href="{% url 'admin:index' %}">
<i class="mdi mdi-cog"></i> {% trans "Admin" %}
<i class="mdi mdi-cog"></i> {% trans "Django Admin" %}
</a>
{% endif %}
<a href="{% url 'account:profile' %}" class="dropdown-item">