add a "view page" for event

ref #3
This commit is contained in:
2016-03-22 21:18:32 +01:00
parent 4d02314770
commit 90cbb78621
8 changed files with 94 additions and 36 deletions

View File

@@ -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()