Continue work on ACL rewritting

* fix center resolver dispatcher
* add scope resolver
* tests for authorization helper
This commit is contained in:
2021-09-19 20:56:20 +02:00
parent 74598ee926
commit b6c58a5c31
18 changed files with 498 additions and 29 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace Chill\MainBundle\Security\Resolver;
use Chill\MainBundle\Entity\Center;
use Chill\MainBundle\Entity\Scope;
interface ScopeResolverInterface
{
public function supports($entity, ?array $options = []): bool;
/**
* @param $entity
* @param array|null $options
* @return Scope|array|Scope[]
*/
public function resolveScope($entity, ?array $options = []);
/**
* Return true if the entity is concerned by scope, false otherwise.
*
* @param $entity
* @param array|null $options
* @return bool
*/
public function isConcerned($entity, ?array $options = []): bool;
public static function getDefaultPriority(): int;
}