From cf99383b9cf493c06c9e357fa47b686c49e134cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 3 Apr 2018 11:27:39 +0200 Subject: [PATCH] Only load clipboard.min.js when authenticated This is used in the attachments form, which is only available to authenticated users. --- src/templates/layout.pug | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/templates/layout.pug b/src/templates/layout.pug index 239f1d5..96b0579 100644 --- a/src/templates/layout.pug +++ b/src/templates/layout.pug @@ -32,7 +32,9 @@ html(lang="en") script(src="{{ url_for('static_pillar', filename='assets/js/vendor/jquery-3.1.0.min.js')}}") script(src="{{ url_for('static_pillar', filename='assets/js/vendor/jquery.typeahead-0.11.1.min.js')}}") script(src="{{ url_for('static_pillar', filename='assets/js/vendor/js.cookie-2.0.3.min.js')}}") + | {% if current_user.is_authenticated %} script(src="{{ url_for('static_pillar', filename='assets/js/vendor/clipboard.min.js')}}") + | {% endif %} | {% if current_user.has_cap('subscriber') %} | {# Only load if we can comment (for converting markdown as-we-type) #}