Sfoglia il codice sorgente

Show link should be used if we doesn't have the edit route

If we have the EDIT role but not the edit route, the identifier doesn't contains a link to the show action
Benoît Lévêque 10 anni fa
parent
commit
ff45197497
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      Datagrid/ListMapper.php

+ 1 - 1
Datagrid/ListMapper.php

@@ -52,7 +52,7 @@ class ListMapper extends BaseMapper
         $fieldDescriptionOptions['identifier'] = true;
 
         if (!isset($fieldDescriptionOptions['route']['name'])) {
-            $routeName = $this->admin->isGranted('EDIT') ? 'edit' : 'show';
+            $routeName = ($this->admin->isGranted('EDIT') && $this->admin->hasRoute('edit')) ? 'edit' : 'show';
             $fieldDescriptionOptions['route']['name'] = $routeName;
         }