{%- for attachment in folder.attachments -%}
{% set previewable = (attachment.file and attachment.file.is_previewable and not g.static_site) or false %}
{% set visible_link = attachment.type.name == 'link' and (not attachment.is_protected or attachment.can_access(session.user)) %}