mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Feature: Add a list export for evaluation, actions and household
This commit is contained in:
@@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\PersonBundle\Security\Authorization;
|
||||
|
||||
use Chill\MainBundle\Entity\Center;
|
||||
use Chill\MainBundle\Security\Authorization\ChillVoterInterface;
|
||||
use Chill\MainBundle\Security\Authorization\VoterHelperFactoryInterface;
|
||||
use Chill\MainBundle\Security\Authorization\VoterHelperInterface;
|
||||
use Chill\MainBundle\Security\ProvideRoleHierarchyInterface;
|
||||
@@ -23,7 +24,7 @@ use Symfony\Component\Security\Core\Security;
|
||||
use UnexpectedValueException;
|
||||
use function in_array;
|
||||
|
||||
class HouseholdVoter extends Voter implements ProvideRoleHierarchyInterface
|
||||
class HouseholdVoter extends Voter implements ProvideRoleHierarchyInterface, ChillVoterInterface
|
||||
{
|
||||
public const EDIT = 'CHILL_PERSON_HOUSEHOLD_EDIT';
|
||||
|
||||
@@ -37,7 +38,9 @@ class HouseholdVoter extends Voter implements ProvideRoleHierarchyInterface
|
||||
public const STATS = 'CHILL_PERSON_HOUSEHOLD_STATS';
|
||||
|
||||
private const ALL = [
|
||||
self::EDIT, self::SEE,
|
||||
self::SEE,
|
||||
self::EDIT,
|
||||
self::STATS,
|
||||
];
|
||||
|
||||
private VoterHelperInterface $helper;
|
||||
@@ -60,7 +63,7 @@ class HouseholdVoter extends Voter implements ProvideRoleHierarchyInterface
|
||||
|
||||
public function getRolesWithHierarchy(): array
|
||||
{
|
||||
return ['Person' => $this->getRoles()];
|
||||
return ['Household' => $this->getRoles()];
|
||||
}
|
||||
|
||||
public function getRolesWithoutScope(): array
|
||||
|
Reference in New Issue
Block a user