mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 02:23:51 +00:00
fix translation and add role hierarchy
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
namespace Chill\EventBundle\Security\Authorization;
|
||||
|
||||
use Chill\MainBundle\Security\Authorization\AbstractChillVoter;
|
||||
use Chill\MainBundle\Security\ProvideRoleInterface;
|
||||
use Chill\MainBundle\Security\ProvideRoleHierarchyInterface;
|
||||
use Chill\EventBundle\Entity\Event;
|
||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
@@ -16,7 +16,7 @@ use Chill\MainBundle\Entity\User;
|
||||
* @author Julien Fastré <julien.fastre@champs-libres.coop>
|
||||
* @author Champs Libres <info@champs-libres.coop>
|
||||
*/
|
||||
class EventVoter extends AbstractChillVoter implements ProvideRoleInterface
|
||||
class EventVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface
|
||||
{
|
||||
|
||||
const SEE = 'CHILL_EVENT_SEE';
|
||||
@@ -60,5 +60,11 @@ class EventVoter extends AbstractChillVoter implements ProvideRoleInterface
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public function getRolesWithHierarchy()
|
||||
{
|
||||
return [ 'Event' => $this->getRoles() ];
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@
|
||||
|
||||
namespace Chill\EventBundle\Security\Authorization;
|
||||
|
||||
use Chill\MainBundle\Security\ProvideRoleInterface;
|
||||
use Chill\MainBundle\Security\ProvideRoleHierarchyInterface;
|
||||
use Chill\MainBundle\Security\Authorization\AbstractChillVoter;
|
||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||
use Chill\EventBundle\Entity\Participation;
|
||||
@@ -30,7 +30,7 @@ use Chill\MainBundle\Entity\User;
|
||||
*
|
||||
* @author Julien Fastré <julien.fastre@champs-libres.coop>
|
||||
*/
|
||||
class ParticipationVoter extends AbstractChillVoter implements ProvideRoleInterface
|
||||
class ParticipationVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface
|
||||
{
|
||||
/**
|
||||
*
|
||||
@@ -78,5 +78,10 @@ class ParticipationVoter extends AbstractChillVoter implements ProvideRoleInterf
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getRolesWithHierarchy()
|
||||
{
|
||||
return [ 'Event' => $this->getRoles() ];
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user