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
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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');