Skip to content
Permalink
Browse files

Grant [generate:entity:content] correct view permissions for revisions (

  • Loading branch information...
Ludo Hartzema authored and LOBsTerr committed Sep 28, 2018
1 parent 37730ce commit 912508f5465962877659480198802c43231e1057
Showing with 2 additions and 2 deletions.
  1. +2 −2 templates/module/src/entity-content-route-provider.php.twig
@@ -80,7 +80,7 @@ class {{ entity_class }}HtmlRouteProvider extends AdminHtmlRouteProvider {% endb
'_title' => "{$entity_type->getLabel()} revisions",
'_controller' => '\Drupal\{{ module }}\Controller\{{ entity_class }}Controller::revisionOverview',
])
->setRequirement('_permission', 'access {{ label|lower }} revisions')
->setRequirement('_permission', 'view all {{ label|lower }} revisions')
->setOption('_admin_route', TRUE);

return $route;
@@ -104,7 +104,7 @@ class {{ entity_class }}HtmlRouteProvider extends AdminHtmlRouteProvider {% endb
'_controller' => '\Drupal\{{ module }}\Controller\{{ entity_class }}Controller::revisionShow',
'_title_callback' => '\Drupal\{{ module }}\Controller\{{ entity_class }}Controller::revisionPageTitle',
])
->setRequirement('_permission', 'access {{ label|lower }} revisions')
->setRequirement('_permission', 'view all {{ label|lower }} revisions')
->setOption('_admin_route', TRUE);

return $route;

0 comments on commit 912508f

Please sign in to comment.
You can’t perform that action at this time.