diff --git a/src/Plugin/Action/UpdateAction.php b/src/Plugin/Action/UpdateAction.php index 20408c1..0e0b36d 100644 --- a/src/Plugin/Action/UpdateAction.php +++ b/src/Plugin/Action/UpdateAction.php @@ -7,6 +7,7 @@ namespace Drupal\pathauto\Plugin\Action; use Drupal\Core\Action\ActionBase; +use Drupal\Core\Session\AccountInterface; /** * Pathauto entity update action. @@ -26,4 +27,12 @@ public function execute($entity = NULL) { $entity->path->pathauto = TRUE; \Drupal::service('pathauto.manager')->updateAlias($entity, 'bulkupdate', array('message' => TRUE)); } + + /** + * {@inheritdoc} + */ + public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) { + $result = AccessResult::allowed(); + return $return_as_object ? $result : $result->isAllowed(); + } }