isPublished()) { return AccessResult::allowedIfHasPermission($account, 'view unpublished reservation categories'); } return AccessResult::allowedIfHasPermission($account, 'view published reservation categories'); case 'update': return AccessResult::allowedIfHasPermission($account, 'edit reservation categories'); case 'delete': return AccessResult::allowedIfHasPermission($account, 'delete reservation categories'); } // Unknown operation, no opinion. return AccessResult::neutral(); } /** * {@inheritdoc} */ protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) { return AccessResult::allowedIfHasPermission($account, 'add reservation categories'); } }