Only load clipboard.min.js when authenticated
This is used in the attachments form, which is only available to authenticated users.
This commit is contained in:
@@ -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-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/jquery.typeahead-0.11.1.min.js')}}")
|
||||||
script(src="{{ url_for('static_pillar', filename='assets/js/vendor/js.cookie-2.0.3.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')}}")
|
script(src="{{ url_for('static_pillar', filename='assets/js/vendor/clipboard.min.js')}}")
|
||||||
|
| {% endif %}
|
||||||
|
|
||||||
| {% if current_user.has_cap('subscriber') %}
|
| {% if current_user.has_cap('subscriber') %}
|
||||||
| {# Only load if we can comment (for converting markdown as-we-type) #}
|
| {# Only load if we can comment (for converting markdown as-we-type) #}
|
||||||
|
Reference in New Issue
Block a user