mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
fix translation and add role hierarchy
This commit is contained in:
parent
6eef0fcf88
commit
21974a048e
@ -42,3 +42,10 @@ The participations were created: Les participations ont été créées
|
||||
#search
|
||||
Event search: Recherche d'événements
|
||||
'%total% events match the search %pattern%' : '{0} Aucun événement ne correspond aux termes de recherche "%pattern%" | {1} Un événement a été trouvé par la recherche "%pattern%" | ]1,Inf] %total% événements correspondent aux termes de recherche "%pattern%".'
|
||||
|
||||
CHILL_EVENT_UPDATE: Modifier un événement
|
||||
CHILL_EVENT_CREATE: Créer un événement
|
||||
CHILL_EVENT_PARTICIPATION_CREATE: Créer une participation à un événement
|
||||
CHILL_EVENT_PARTICIPATION_UPDATE: Modifier une participation à un événement
|
||||
CHILL_EVENT_SEE: Voir un événement
|
||||
CHILL_EVENT_SEE_DETAILS: Voir les détails d'un événement
|
||||
|
@ -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() ];
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user