Skip to content
Snippets Groups Projects
Commit 0b4d722a authored by Christopher C. Wells's avatar Christopher C. Wells
Browse files

Issue #2898712 by nicolas.rafaelli, wells: Error when i reference a colossal menu on content type

parent c951e414
No related branches found
No related tags found
No related merge requests found
......@@ -21,10 +21,7 @@ protected function checkAccess(EntityInterface $entity, $operation, AccountInter
/** @var \Drupal\colossal_menu\LinkInterface $entity */
switch ($operation) {
case 'view':
if (!$entity->isEnabled()) {
return AccessResult::allowedIfHasPermission($account, 'view disabled colossal_menu');
}
return AccessResult::allowedIfHasPermission($account, 'view enabled colossal_menu');
return AccessResult::allowedIfHasPermission($account, 'view colossal_menu');
case 'update':
return AccessResult::allowedIfHasPermission($account, 'edit colossal_menu');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment