remove usage of deprecated Role into Export

This commit is contained in:
2022-09-05 17:26:36 +02:00
parent c442529799
commit 75bdc335e5
125 changed files with 153 additions and 154 deletions

View File

@@ -139,10 +139,8 @@ interface ExportInterface extends ExportElementInterface
/**
* Return the required Role to execute the Export.
*
* @return \Symfony\Component\Security\Core\Role\Role
*/
public function requiredRole();
public function requiredRole(): string;
/**
* Inform which ModifiersInterface (i.e. AggregatorInterface, FilterInterface)

View File

@@ -550,7 +550,7 @@ class ExportManager
if (null === $centers) {
$centers = $this->authorizationHelper->getReachableCenters(
$this->user,
$role->getRole(),
$role
);
}

View File

@@ -26,9 +26,9 @@ interface ModifierInterface extends ExportElementInterface
* If null, will used the ExportInterface::requiredRole role from
* the current executing export.
*
* @return \Symfony\Component\Security\Core\Role\Role|null A role required to execute this ModifiersInterface
* @return string|null A role required to execute this ModifiersInterface
*/
public function addRole();
public function addRole(): ?string;
/**
* Alter the query initiated by the export, to add the required statements