src/PHPDish/Bundle/ResourceBundle/Security/EntityVoter.php
protected function canView($entity, UserInterface $user)
    {
        return $this->canEdit($entity, $user) || $entity->isEnabled();
    }
protected function canView($entity, UserInterface $user)
    {
        return $this->canEdit($entity, $user) || $entity->isEnabled();
    }
如果资源已经公开，或者资源属于该用户则公开查看.

@param mixed         $entity
@param UserInterface $user

@return bool