mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-01 22:46:13 +00:00
33 lines
788 B
PHP
33 lines
788 B
PHP
<?php
|
|
|
|
namespace Chill\MainBundle\Security\Authorization;
|
|
|
|
use Chill\MainBundle\Entity\Center;
|
|
use Chill\MainBundle\Entity\Scope;
|
|
use Chill\MainBundle\Entity\User;
|
|
use Symfony\Component\Security\Core\Role\Role;
|
|
|
|
interface AuthorizationHelperInterface
|
|
{
|
|
|
|
/**
|
|
* Get reachable Centers for the given user, role,
|
|
* and optionnaly Scope
|
|
*
|
|
* @param User $user
|
|
* @param string|Role $role
|
|
* @param null|Scope $scope
|
|
* @return Center[]
|
|
*/
|
|
public function getReachableCenters(User $user, string $role, ?Scope $scope = null): array;
|
|
|
|
/**
|
|
* @param User $user
|
|
* @param string $role
|
|
* @param Center|Center[]|array $center
|
|
* @return array
|
|
*/
|
|
public function getReachableScopes(User $user, string $role, $center): array;
|
|
|
|
}
|