mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
DX: fix phpstan errors
This commit is contained in:
@@ -225,10 +225,9 @@ final class ActivityACLAwareRepository implements ActivityACLAwareRepositoryInte
|
||||
$personToCenter = $metadataPerson->getAssociationMapping('center')['joinColumns'][0]['name'];
|
||||
|
||||
// acls:
|
||||
$role = new Role(ActivityVoter::SEE);
|
||||
$reachableCenters = $this->authorizationHelper->getReachableCenters(
|
||||
$this->tokenStorage->getToken()->getUser(),
|
||||
$role
|
||||
ActivityVoter::SEE
|
||||
);
|
||||
|
||||
if (count($reachableCenters) === 0) {
|
||||
@@ -239,7 +238,7 @@ final class ActivityACLAwareRepository implements ActivityACLAwareRepositoryInte
|
||||
if ('person' === $context) {
|
||||
// we start with activities having the person_id linked to person
|
||||
$where .= sprintf('%s = ? AND ', $activityToPerson);
|
||||
$parameters[] = $person->getId();
|
||||
$parameters[] = $args['context']->getId();
|
||||
}
|
||||
|
||||
// we add acl (reachable center and scopes)
|
||||
@@ -252,7 +251,7 @@ final class ActivityACLAwareRepository implements ActivityACLAwareRepositoryInte
|
||||
continue;
|
||||
}
|
||||
// we get all the reachable scopes for this center
|
||||
$reachableScopes = $this->authorizationHelper->getReachableScopes($this->tokenStorage->getToken()->getUser(), $role, $center);
|
||||
$reachableScopes = $this->authorizationHelper->getReachableScopes($this->tokenStorage->getToken()->getUser(), ActivityVoter::SEE, $center);
|
||||
// we get the ids for those scopes
|
||||
$reachablesScopesId = array_map(
|
||||
static function (Scope $scope) {
|
||||
|
Reference in New Issue
Block a user