mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
remove usage of deprecated Role into Export
This commit is contained in:
@@ -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)
|
||||
|
@@ -550,7 +550,7 @@ class ExportManager
|
||||
if (null === $centers) {
|
||||
$centers = $this->authorizationHelper->getReachableCenters(
|
||||
$this->user,
|
||||
$role->getRole(),
|
||||
$role
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user