Prechádzať zdrojové kódy

fix permission name - not SHOW, but VIEW; (#4360)

#4359
Adam 8 rokov pred
rodič
commit
77ab7fc62a

+ 1 - 1
Resources/doc/cookbook/recipe_customizing_a_mosaic_list.rst

@@ -64,7 +64,7 @@ The ``list_outer_rows_mosaic.html.twig`` is the name of one mosaic's tile. You s
     {% block sonata_mosaic_description %}
         {% if admin.isGranted('EDIT', object) and admin.hasRoute('edit') %}
             <a href="{{ admin.generateUrl('edit', {'id' : object|sonata_urlsafeid(admin) }) }}">{{ meta.title|truncate(40) }}</a>
-        {% elseif admin.isGranted('SHOW', object) and admin.hasRoute('show') %}
+        {% elseif admin.isGranted('VIEW', object) and admin.hasRoute('show') %}
             <a href="{{ admin.generateUrl('show', {'id' : object|sonata_urlsafeid(admin) }) }}">{{ meta.title|truncate(40) }}</a>
         {% else %}
             {{ meta.title|truncate(40) }}

+ 1 - 1
Resources/views/CRUD/list_outer_rows_mosaic.html.twig

@@ -60,7 +60,7 @@ This template can be customized to match your needs. You should only extends the
                             {% block sonata_mosaic_description %}
                                 {% if admin.isGranted('EDIT', object) and admin.hasRoute('edit') %}
                                     <a class="mosaic-inner-link" href="{{ admin.generateUrl('edit', {'id' : object|sonata_urlsafeid(admin) }) }}">{{ meta.title|truncate(40) }}</a>
-                                {% elseif admin.isGranted('SHOW', object) and admin.hasRoute('show') %}
+                                {% elseif admin.isGranted('VIEW', object) and admin.hasRoute('show') %}
                                     <a class="mosaic-inner-link" href="{{ admin.generateUrl('show', {'id' : object|sonata_urlsafeid(admin) }) }}">{{ meta.title|truncate(40) }}</a>
                                 {% else %}
                                     {{ meta.title|truncate(40) }}