From e7bff7794b790b44ef88ae4873f12fa156f8c550 Mon Sep 17 00:00:00 2001
From: Bertrand Gauthier <bertrand.gauthier@unicaen.fr>
Date: Wed, 20 Mar 2019 16:31:49 +0100
Subject: [PATCH] Correction bug introduit lors de la refactorisation pour ZF3.

---
 src/UnicaenAuth/Guard/PrivilegeController.php | 22 +++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/UnicaenAuth/Guard/PrivilegeController.php b/src/UnicaenAuth/Guard/PrivilegeController.php
index 4607b8d..795995f 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) {
-- 
GitLab