Commit 57384c7b authored by catch's avatar catch
Browse files

Revert "Issue 2102916: follow up by Berdir, HEAD Broken."

This reverts commit 2db9d595.
parent 2db9d595
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
use Drupal\Core\Entity\EntityAccessController; use Drupal\Core\Entity\EntityAccessController;
use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Session\AccountInterface; use Drupal\user\Plugin\Core\Entity\User;
/** /**
* Defines an access controller for the menu link entity. * Defines an access controller for the menu link entity.
...@@ -21,7 +21,7 @@ class MenuLinkAccessController extends EntityAccessController { ...@@ -21,7 +21,7 @@ class MenuLinkAccessController extends EntityAccessController {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function checkAccess(EntityInterface $entity, $operation, $langcode, AccountInterface $account) { protected function checkAccess(EntityInterface $entity, $operation, $langcode, User $account) {
$access = user_access('administer menu', $account); $access = user_access('administer menu', $account);
if ($access && $operation == 'delete') { if ($access && $operation == 'delete') {
// Only items created by the menu module can be deleted. // Only items created by the menu module can be deleted.
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
use Drupal\Core\Entity\EntityAccessController; use Drupal\Core\Entity\EntityAccessController;
use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Session\AccountInterface; use Drupal\user\Plugin\Core\Entity\User;
/** /**
* Defines an access controller for the menu entity. * Defines an access controller for the menu entity.
...@@ -21,7 +21,7 @@ class MenuAccessController extends EntityAccessController { ...@@ -21,7 +21,7 @@ class MenuAccessController extends EntityAccessController {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected function checkAccess(EntityInterface $entity, $operation, $langcode, AccountInterface $account) { protected function checkAccess(EntityInterface $entity, $operation, $langcode, User $account) {
if ($operation == 'delete') { if ($operation == 'delete') {
// System-defined menus may not be deleted. // System-defined menus may not be deleted.
// @todo Refactor https://drupal.org/node/1882552 // @todo Refactor https://drupal.org/node/1882552
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment