From 0ef6dd10cf9bdf0cd1ac9555dfd944175c551bb6 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Fri, 12 Apr 2013 14:55:52 +0200 Subject: [PATCH] authorized video download to perms.telemeta.can_play_all_items --- teleforma/templates/teleforma/course_media.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/teleforma/templates/teleforma/course_media.html b/teleforma/templates/teleforma/course_media.html index 446cc2aa..19795c11 100644 --- a/teleforma/templates/teleforma/course_media.html +++ b/teleforma/templates/teleforma/course_media.html @@ -58,10 +58,12 @@ $(document).ready(function(){ {% endblock extra_javascript %} {% block module-action %} -{% if media.item.file and media.is_published and not "video" in media.mime_type %} -
- {% trans "Download" %} -
+{% if media.item.file and media.is_published %} + {% if not "video" in media.mime_type or perms.telemeta.can_play_all_items %} +
+  {% trans "Download" %} +
+ {% endif %} {% endif %} {% endblock module-action %} -- 2.39.5