mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-13 11:54:32 +02:00
Added a permission to control which users can access private attachments.
This commit is contained in:
parent
9769915b34
commit
e83d72ec10
7 changed files with 31 additions and 9 deletions
|
@ -42,7 +42,9 @@
|
|||
</span>
|
||||
</h6>
|
||||
{% endif %}
|
||||
{% if attach.picture %}
|
||||
{% if attach.secure and not is_granted('show_private', attach) %}
|
||||
{# Leave blank #}
|
||||
{% elseif attach.picture %}
|
||||
<a href="{{ attach | entityURL('file_view') }}" target="_blank" rel="noopener" data-no-ajax>
|
||||
<img class="img-fluid img-thumbnail thumbnail-sm" src="{{ attachment_thumbnail(attach, 'thumbnail_md') }}" alt="{% trans %}attachment.preview.alt{% endtrans %}" />
|
||||
</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue