mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
@@ -8,6 +8,7 @@ use Chill\MainBundle\Security\Authorization\AbstractChillVoter;
|
||||
use Chill\MainBundle\Security\ProvideRoleInterface;
|
||||
use Chill\EventBundle\Entity\Event;
|
||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
|
||||
/**
|
||||
* Description of EventVoter
|
||||
@@ -42,12 +43,12 @@ class EventVoter extends AbstractChillVoter implements ProvideRoleInterface
|
||||
}
|
||||
|
||||
protected function isGranted($attribute, $event, $user = null)
|
||||
{
|
||||
{
|
||||
if (!$user instanceof User) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->helper->userHasAccess($user, $event, $attribute);
|
||||
return $this->authorizationHelper->userHasAccess($user, $event, $attribute);
|
||||
}
|
||||
|
||||
public function getRoles()
|
||||
|
Reference in New Issue
Block a user