From 219e273e08e444366978f4c263b4cf3c4fff1323 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Mon, 20 Aug 2018 10:31:59 +0200 Subject: [PATCH] Download button in list restricted to allowed users --- teleforma/templates/teleforma/inc/media_list.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/teleforma/templates/teleforma/inc/media_list.html b/teleforma/templates/teleforma/inc/media_list.html index afde6ad0..0ed5f56e 100644 --- a/teleforma/templates/teleforma/inc/media_list.html +++ b/teleforma/templates/teleforma/inc/media_list.html @@ -51,10 +51,12 @@ {% elif not media.is_published and user.is_staff %} {% endif %} - {% if media.item.file %} - - - + {% if media.item.file and media.is_published or user.is_superuser or user.is_staff %} + {% if not "video" in media.mime_type or perms.telemeta.can_play_all_items or request.user_agent.os.family == 'iOS' %} + + + + {% endif %} {% endif %} -- 2.39.5