Use IsGranted in EntryController

This commit is contained in:
Yassine Guedidi
2024-03-23 15:34:02 +01:00
parent 92786c6304
commit b8819cc3d7
16 changed files with 575 additions and 151 deletions

View File

@ -7,9 +7,13 @@
{% endfor %}
</ul>
{% if app.user.config.displayThumbnails %}
<a href="{{ path('view', {'id': entry.id}) }}">
<span class="preview" style="background-image: url({{ entry.previewPicture }})"></span>
</a>
{% if is_granted('VIEW', entry) %}
<a href="{{ path('view', {'id': entry.id}) }}">
<span class="preview" style="background-image: url({{ entry.previewPicture }})"></span>
</a>
{% else %}
<span class="preview" style="background-image: url({{ entry.previewPicture }})"></span>
{% endif %}
{% endif %}
</div>
{% include "Entry/Card/_content.html.twig" with {'entry': entry} only %}