Merge pull request #1974 from alphagov/org-links-dont-show-if-user-doesnt-have-permissions

Org links don't show if user doesn't have permissions
This commit is contained in:
Chris Waszczuk
2018-03-21 16:15:42 +00:00
committed by GitHub
5 changed files with 18 additions and 7 deletions

View File

@@ -16,7 +16,11 @@
<ul>
{% for service in organisation_services %}
<li class="browse-list-item">
<a href="{{ url_for('main.service_dashboard', service_id=service['id']) }}" class="browse-list-link">{{ service['name'] }}</a>
{% if service.has_permission_to_view %}
<a href="{{ url_for('main.service_dashboard', service_id=service['id']) }}" class="browse-list-link">{{ service['name'] }}</a>
{% else %}
{{ service['name'] }}
{% endif %}
</li>
{% endfor %}
</ul>