comparison core/modules/menu_link_content/src/MenuLinkContentAccessControlHandler.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
70 } 70 }
71 return $access; 71 return $access;
72 } 72 }
73 73
74 case 'delete': 74 case 'delete':
75 return AccessResult::allowedIf(!$entity->isNew() && $account->hasPermission('administer menu'))->cachePerPermissions()->addCacheableDependency($entity); 75 return AccessResult::allowedIfHasPermission($account, 'administer menu')
76 ->andIf(AccessResult::allowedIf(!$entity->isNew())->addCacheableDependency($entity));
76 } 77 }
77 } 78 }
78 79
79 } 80 }