Merge pull request #2665 from alphagov/fix-showing-name-of-service-you-dont-belong-to

Hide ‘back to …’ link if it’s not your service
This commit is contained in:
Chris Hill-Scott
2019-01-16 11:35:53 +00:00
committed by GitHub
4 changed files with 57 additions and 3 deletions

View File

@@ -2,7 +2,7 @@
{% block fullwidth_content %}
<div id="content">
{% if current_service and current_user.is_authenticated %}
{% if current_service and current_user.is_authenticated and current_user.belongs_to_service(current_service.id) %}
<div class="navigation-service">
<a href="{{ url_for('main.show_accounts_or_dashboard') }}">Back to {{ current_service.name }}</a>
</div>