Check view permissions for object navigation tabs

This commit is contained in:
Jeremy Stretch
2019-04-12 09:29:36 -04:00
parent bf3e1f9178
commit 8e4f56ba88
18 changed files with 105 additions and 63 deletions

View File

@@ -47,9 +47,11 @@
<li role="presentation"{% if not active_tab %} class="active"{% endif %}>
<a href="{{ rack.get_absolute_url }}">Rack</a>
</li>
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'dcim:rack_changelog' pk=rack.pk %}">Changelog</a>
</li>
{% if perms.extras.view_objectchange %}
<li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
<a href="{% url 'dcim:rack_changelog' pk=rack.pk %}">Changelog</a>
</li>
{% endif %}
</ul>
{% endblock %}