|
@@ -14,10 +14,10 @@ file that was distributed with this source code.
|
|
|
{% block actions %}
|
|
|
<div class="sonata-actions">
|
|
|
<ul>
|
|
|
- {% if admin.hasroute('edit') and admin.id(object) and admin.isGranted('EDIT') and admin.show|length > 0 %}
|
|
|
+ {% if admin.hasroute('edit') and admin.id(object) and admin.isGranted('EDIT', object) and admin.show|length > 0 %}
|
|
|
<li class="btn sonata-action-element"><a href="{{ admin.generateObjectUrl('edit', object) }}">{% trans from 'SonataAdminBundle' %}link_action_edit{% endtrans %}</a></li>
|
|
|
{% endif %}
|
|
|
- {% if admin.hasroute('show') and admin.isGranted('SHOW')%}
|
|
|
+ {% if admin.hasroute('show') and admin.isGranted('VIEW', object)%}
|
|
|
<li class="btn sonata-action-element"><a href="{{ admin.generateObjectUrl('show', object) }}">{% trans from 'SonataAdminBundle' %}link_action_show{% endtrans %}</a></li>
|
|
|
{% endif %}
|
|
|
{% if admin.hasroute('list') and admin.isGranted('LIST')%}
|