Add StoredObjectVoterInterface

An interface is defined that can be implemented by each context-specific voter in the future.
This commit is contained in:
Julie Lenaerts 2024-06-14 16:48:09 +02:00
parent 7923b5a1ef
commit 65c41e6fa9

View File

@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace ChillDocStoreBundle\Security\Authorization;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
interface StoredObjectVoterInterface {
public function supports(string $attribute, $subject): bool;
public function voteOnAttribute(string $attribute, $subject, TokenInterface $token): bool;
}