Skip to content

Commit 0b5cc12

Browse files
committed
hide tags link when logged out
1 parent a7e5a19 commit 0b5cc12

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

application/blueprints/tags/views.py

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414

1515
@tags.route("/tags")
16+
@tags.route("/")
1617
@login_required
1718
def index():
1819
tags = Tag.query.order_by(Tag.name).all()

application/templates/layouts/base.html

+10-8
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,16 @@ <h1 class="govuk-heading-xl">{{ title | default('Index') }}</h1>
164164
<div class="govuk-width-container">
165165
<div class="govuk-footer__meta">
166166
<div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
167-
<h2 class="govuk-visually-hidden">Admin links</h2>
168-
<ul class="govuk-footer__inline-list">
169-
<li class="govuk-footer__inline-list-item">
170-
<a class="govuk-footer__link" href="{{ url_for('tags.index') }}">
171-
Tags
172-
</a>
173-
</li>
174-
</ul>
167+
{% if config.AUTHENTICATION_ON and session["user"] %}
168+
<h2 class="govuk-visually-hidden">Admin links</h2>
169+
<ul class="govuk-footer__inline-list">
170+
<li class="govuk-footer__inline-list-item">
171+
<a class="govuk-footer__link" href="{{ url_for('tags.index') }}">
172+
Tags
173+
</a>
174+
</li>
175+
</ul>
176+
{% endif %}
175177
<div class="govuk-footer__meta-custom">
176178
The <a class="govuk-footer__link" href="https://github.com/digital-land/digital-land/">software</a> and <a class="govuk-footer__link" href="https://github.com/digital-land/digital-land/">data</a> used to build these pages is <a class="govuk-footer__link" href="https://github.com/digital-land/digital-land/blob/master/LICENSE">open source</a>.
177179
</div>

0 commit comments

Comments
 (0)