Commit e7bff779 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Correction bug introduit lors de la refactorisation pour ZF3.

parent ed53caad
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -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) {