Skip to content

Commit

Permalink
Add member admin url to main page
Browse files Browse the repository at this point in the history
Only when the permission admin or chapter leader is set
  • Loading branch information
rrooij authored and JordiVanOsAvisi committed Dec 5, 2023
1 parent 2358f7d commit 6f89726
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions templates/user/layout/members.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@
'Home': 'member_home',
'Gegevens': 'member_details',
'Documenten': 'member_documents',
'Ledenbeheer': 'admin_dashboard',
'Uitloggen': 'logout'
} %}
<li{% if app.request.attributes.get('_route') == route %} class="current"{% endif %}>
<a href="{{ url(route) }}">{{ text }}</a>
</li>
<li{% if app.request.attributes.get('_route') == route %} class="current"{% endif %}>
{% if route != "admin_dashboard" or ( route == "admin_dashboard" and (is_granted("ROLE_ADMIN") or is_granted("ROLE_DIVISION_CONTACT")) ) %}
<a href="{{ url(route) }}">{{ text }}</a>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
Expand Down

0 comments on commit 6f89726

Please sign in to comment.