Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
57384c7b
Commit
57384c7b
authored
Jun 12, 2013
by
Nathaniel Catchpole
Browse files
Revert "Issue 2102916: follow up by Berdir, HEAD Broken."
This reverts commit
2db9d595
.
parent
2db9d595
Changes
2
Hide whitespace changes
Inline
Side-by-side
core/modules/menu_link/lib/Drupal/menu_link/MenuLinkAccessController.php
View file @
57384c7b
...
...
@@ -9,7 +9,7 @@
use
Drupal\Core\Entity\EntityAccessController
;
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.
...
...
@@ -21,7 +21,7 @@ class MenuLinkAccessController extends EntityAccessController {
/**
* {@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
);
if
(
$access
&&
$operation
==
'delete'
)
{
// Only items created by the menu module can be deleted.
...
...
core/modules/system/lib/Drupal/system/MenuAccessController.php
View file @
57384c7b
...
...
@@ -9,7 +9,7 @@
use
Drupal\Core\Entity\EntityAccessController
;
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.
...
...
@@ -21,7 +21,7 @@ class MenuAccessController extends EntityAccessController {
/**
* {@inheritdoc}
*/
protected
function
checkAccess
(
EntityInterface
$entity
,
$operation
,
$langcode
,
AccountInterface
$account
)
{
protected
function
checkAccess
(
EntityInterface
$entity
,
$operation
,
$langcode
,
User
$account
)
{
if
(
$operation
==
'delete'
)
{
// System-defined menus may not be deleted.
// @todo Refactor https://drupal.org/node/1882552
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment