diff --git a/Export/Aggregator/GenderAggregator.php b/Export/Aggregator/GenderAggregator.php index d0be7295b..56cbfacfa 100644 --- a/Export/Aggregator/GenderAggregator.php +++ b/Export/Aggregator/GenderAggregator.php @@ -24,6 +24,8 @@ use Symfony\Component\Form\FormBuilderInterface; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Translation\TranslatorInterface; use Chill\PersonBundle\Entity\Person; +use Chill\PersonBundle\Security\Authorization\PersonVoter; +use Symfony\Component\Security\Core\Role\Role; /** * @@ -82,4 +84,10 @@ class GenderAggregator implements AggregatorInterface '_header' => $this->translator->trans('Gender') ); } + + public function requiredRole() + { + return new Role(PersonVoter::STATS); + } + } diff --git a/Export/Aggregator/NationalityAggregator.php b/Export/Aggregator/NationalityAggregator.php index ce1a991b0..dbbaaa596 100644 --- a/Export/Aggregator/NationalityAggregator.php +++ b/Export/Aggregator/NationalityAggregator.php @@ -25,6 +25,8 @@ use Doctrine\ORM\QueryBuilder; use Doctrine\ORM\EntityRepository; use Chill\MainBundle\Templating\TranslatableStringHelper; use Symfony\Component\Translation\TranslatorInterface; +use Symfony\Component\Security\Core\Role\Role; +use Chill\PersonBundle\Security\Authorization\PersonVoter; /** * @@ -123,6 +125,11 @@ class NationalityAggregator implements AggregatorInterface return array('nationality_aggregator'); } + public function requiredRole() + { + return new Role(PersonVoter::STATS); + } + public function getLabels($key, array $values, $data) { if ($data['group_by_level'] === 'country') {