diff --git a/src/UnicaenAuth/Guard/PrivilegeController.php b/src/UnicaenAuth/Guard/PrivilegeController.php index 4607b8d35f5253736d42f1d6e906d78fd7f10b21..795995fa15186e3236f4ccdc60108a1d140a07c3 100644 --- a/src/UnicaenAuth/Guard/PrivilegeController.php +++ b/src/UnicaenAuth/Guard/PrivilegeController.php @@ -18,22 +18,22 @@ class PrivilegeController extends Controller use PrivilegeProviderAwareTrait; use SessionContainerTrait; -// public function __construct(array $rules, ServiceLocatorInterface $serviceLocator) -// { -// $this->serviceLocator = $serviceLocator; -// -// parent::__construct($rules, $serviceLocator); -// } - + /** + * {@inheritdoc} + */ public function processConfig() { - $this->rules = $this->privilegesToRoles(); + $this->config = $this->privilegesToRoles($this->config); + + parent::processConfig(); } - protected function privilegesToRoles() + /** + * @param array $rules + * @return array + */ + protected function privilegesToRoles(array $rules) { - $rules = $this->config; - $pr = $this->getPrivilegeProvider()->getPrivilegesRoles(); foreach ($rules as $index => $rule) {