mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-27 18:13:48 +00:00
add ACL for export
This commit is contained in:
@@ -24,6 +24,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Doctrine\ORM\Query\Expr;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -78,4 +79,9 @@ class GenderFilter implements FilterInterface
|
||||
{
|
||||
return 'Filter by person gender';
|
||||
}
|
||||
|
||||
public function requiredRole()
|
||||
{
|
||||
return new Role(\Chill\PersonBundle\Security\Authorization\PersonVoter::STATS);
|
||||
}
|
||||
}
|
||||
|
@@ -23,6 +23,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Chill\MainBundle\Export\FilterInterface;
|
||||
use Doctrine\ORM\Query\Expr;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -63,4 +64,9 @@ class NationalityFilter implements FilterInterface
|
||||
{
|
||||
return "Filter by person's nationality";
|
||||
}
|
||||
|
||||
public function requiredRole()
|
||||
{
|
||||
return new Role(\Chill\PersonBundle\Security\Authorization\PersonVoter::STATS);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user