From: Guillaume Pellerin Date: Mon, 20 Aug 2018 08:31:59 +0000 (+0200) Subject: Download button in list restricted to allowed users X-Git-Tag: 1.4.0~40 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=219e273e08e444366978f4c263b4cf3c4fff1323;p=teleforma.git Download button in list restricted to allowed users --- 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 %}