mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Use correct permission name 'show_private' instead of 'show_secure' in templates
This fixes issue #307
This commit is contained in:
parent
3614c82632
commit
f57a0ecba2
2 changed files with 3 additions and 3 deletions
|
@ -20,7 +20,7 @@
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro attachment_icon(attachment, attachment_helper, class = "fa-fw fas fa-3x hoverpic", link = true) %}
|
{% macro attachment_icon(attachment, attachment_helper, class = "fa-fw fas fa-3x hoverpic", link = true) %}
|
||||||
{% set disabled = attachment.secure and not is_granted("show_secure", attachment) %}
|
{% set disabled = attachment.secure and not is_granted("show_private", attachment) %}
|
||||||
{% if not attachment_helper or attachment_helper.fileExisting(attachment) %}
|
{% if not attachment_helper or attachment_helper.fileExisting(attachment) %}
|
||||||
{% if link and not disabled %}
|
{% if link and not disabled %}
|
||||||
<a target="_blank" data-turbo="false" rel="noopener" href="{{ entity_url(attachment, 'file_view') }}">
|
<a target="_blank" data-turbo="false" rel="noopener" href="{{ entity_url(attachment, 'file_view') }}">
|
||||||
|
|
|
@ -59,12 +59,12 @@
|
||||||
|
|
||||||
<td><div class="btn-group" role="group" aria-label="">
|
<td><div class="btn-group" role="group" aria-label="">
|
||||||
<a {% if attachment_manager.fileExisting(attachment) %}href="{{ entity_url(attachment, 'file_view') }}"{% endif %} target="_blank"
|
<a {% if attachment_manager.fileExisting(attachment) %}href="{{ entity_url(attachment, 'file_view') }}"{% endif %} target="_blank"
|
||||||
class="btn btn-secondary {% if not attachment_manager.fileExisting(attachment) or (attachment.secure and not is_granted("show_secure", attachment)) %}disabled{% endif %}"
|
class="btn btn-secondary {% if not attachment_manager.fileExisting(attachment) or (attachment.secure and not is_granted("show_private", attachment)) %}disabled{% endif %}"
|
||||||
data-turbo="false" title="{% trans %}attachment.view{% endtrans %}" rel="noopener">
|
data-turbo="false" title="{% trans %}attachment.view{% endtrans %}" rel="noopener">
|
||||||
<i class="fas fa-eye fa-fw"></i>
|
<i class="fas fa-eye fa-fw"></i>
|
||||||
</a>
|
</a>
|
||||||
<a {% if attachment_manager.fileExisting(attachment) %}href="{{ entity_url(attachment, 'file_download') }}"{% endif %} data-turbo="false"
|
<a {% if attachment_manager.fileExisting(attachment) %}href="{{ entity_url(attachment, 'file_download') }}"{% endif %} data-turbo="false"
|
||||||
class="btn btn-secondary {% if not attachment_manager.fileExisting(attachment) or (attachment.secure and not is_granted("show_secure", attachment)) %}disabled{% endif %}"
|
class="btn btn-secondary {% if not attachment_manager.fileExisting(attachment) or (attachment.secure and not is_granted("show_private", attachment)) %}disabled{% endif %}"
|
||||||
title="{% trans %}attachment.download{% endtrans %}">
|
title="{% trans %}attachment.download{% endtrans %}">
|
||||||
<i class="fas fa-download fa-fw"></i>
|
<i class="fas fa-download fa-fw"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue