Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/Plugin/Action/UpdateAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
namespace Drupal\pathauto\Plugin\Action;

use Drupal\Core\Action\ActionBase;
use Drupal\Core\Session\AccountInterface;

/**
* Pathauto entity update action.
Expand All @@ -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();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not checking any permission here.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
}