Add IsGranted to TagController

This commit is contained in:
Yassine Guedidi
2025-03-16 15:00:28 +01:00
parent 4a1598165f
commit 943bfd9162
13 changed files with 310 additions and 41 deletions

View File

@ -316,12 +316,14 @@
</li>
{% endif %}
</ul>
{% include "Entry/_tags.html.twig" with {'tags': entry.tags, 'entryId': entry.id, 'withRemove': true} only %}
{% include "Entry/_tags.html.twig" with {'tags': entry.tags, 'entryId': entry.id, 'withRemove': is_granted('UNTAG', entry)} only %}
</div>
<div class="input-field nav-panel-add-tag" style="display: none">
{{ render(controller('Wallabag\\Controller\\TagController::addTagFormAction', {'id': entry.id})) }}
</div>
{% if is_granted('TAG', entry) %}
<div class="input-field nav-panel-add-tag" style="display: none">
{{ render(controller('Wallabag\\Controller\\TagController::addTagFormAction', {'id': entry.id})) }}
</div>
{% endif %}
</aside>
<article{% if entry.language is defined and entry.language is not null %} lang="{{ entry.getHTMLLanguage() }}"{% endif %}>