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

@ -21,9 +21,11 @@
<div class="row">
<div class="col s12">
<a href="{{ path('new') }}">{{ 'howto.form.description'|trans }}</a>
</div>
{% if is_granted('CREATE_ENTRIES') %}
<div class="col s12">
<a href="{{ path('new') }}">{{ 'howto.form.description'|trans }}</a>
</div>
{% endif %}
<div class="col s12">
<h5>{{ 'howto.top_menu.browser_addons'|trans }}</h5>
@ -43,12 +45,13 @@
</ul>
</div>
<div class="col s12">
<h5>{{ 'howto.top_menu.bookmarklet'|trans }}</h5>
{{ 'howto.bookmarklet.description'|trans }}
{% include 'Static/_bookmarklet.html.twig' %}
</div>
{% if is_granted('CREATE_ENTRIES') %}
<div class="col s12">
<h5>{{ 'howto.top_menu.bookmarklet'|trans }}</h5>
{{ 'howto.bookmarklet.description'|trans }}
{% include 'Static/_bookmarklet.html.twig' %}
</div>
{% endif %}
</div>
</div>

View File

@ -37,7 +37,9 @@
<div class="card-action">
<ul>
<li><a href="https://doc.wallabag.org/en/user/articles/save.html">{{ 'quickstart.first_steps.new_article'|trans }}</a></li>
<li><a href="{{ path('unread') }}">{{ 'quickstart.first_steps.unread_articles'|trans }}</a></li>
{% if is_granted('LIST_ENTRIES') %}
<li><a href="{{ path('unread') }}">{{ 'quickstart.first_steps.unread_articles'|trans }}</a></li>
{% endif %}
</ul>
</div>
</div>