[Bugfix] Fix permissions when viewing VLANs, but Prefix permission is disabled

This commit is contained in:
Navdeep Sidhu 2021-08-16 13:31:40 +12:00
parent 3feba2997f
commit a16ad9969b
No known key found for this signature in database
GPG Key ID: BB9616F1F29BB348

View File

@ -72,11 +72,15 @@ VLAN_LINK = """
"""
VLAN_PREFIXES = """
{% if perms.ipam.view_prefix %}
{% for prefix in record.prefixes.all %}
<a href="{% url 'ipam:prefix' pk=prefix.pk %}">{{ prefix }}</a>{% if not forloop.last %}<br />{% endif %}
{% empty %}
&mdash;
{% endfor %}
{% else %}
&mdash;
{% endif }
"""
VLAN_ROLE_LINK = """