protected function checkAuth($resources, $modules, $accesses)
    {
        $resources = \is_array($resources) ? $resources : array($resources);
        $modules = \is_array($modules) ? $modules : array($modules);
        $accesses = \is_array($accesses) ? $accesses : array($accesses);

        if ($this->getSecurityContext()->isGranted(array("ADMIN"), $resources, $modules, $accesses)) {
            // Okay !
             return null;
        }

         // Log the problem
         $this->adminLogAppend(implode(",", $resources), implode(",", $accesses), "User is not granted for resources %s with accesses %s", implode(", ", $resources), implode(", ", $accesses));

        return $this->errorPage($this->getTranslator()->trans("Sorry, you're not allowed to perform this action"), 403);
    }
protected function checkAuth($resources, $modules, $accesses)
    {
        $resources = \is_array($resources) ? $resources : array($resources);
        $modules = \is_array($modules) ? $modules : array($modules);
        $accesses = \is_array($accesses) ? $accesses : array($accesses);

        if ($this->getSecurityContext()->isGranted(array("ADMIN"), $resources, $modules, $accesses)) {
            // Okay !
             return null;
        }

         // Log the problem
         $this->adminLogAppend(implode(",", $resources), implode(",", $accesses), "User is not granted for resources %s with accesses %s", implode(", ", $resources), implode(", ", $accesses));

        return $this->errorPage($this->getTranslator()->trans("Sorry, you're not allowed to perform this action"), 403);
    }
protected function checkAuth ( $ resources , $ modules , $ accesses ) { $ resources = \ is_array ( $ resources ) ? $ resources : array ( $ resources ) ; $ modules = \ is_array ( $ modules ) ? $ modules : array ( $ modules ) ; $ accesses = \ is_array ( $ accesses ) ? $ accesses : array ( $ accesses ) ; if ( $ this -> getSecurityContext ( ) -> isGranted ( array ( "ADMIN" ) , $ resources , $ modules , $ accesses ) ) { // Okay ! return null ; } // Log the problem $ this -> adminLogAppend ( implode ( "," , $ resources ) , implode ( "," , $ accesses ) , "User is not granted for resources %s with accesses %s" , implode ( ", " , $ resources ) , implode ( ", " , $ accesses ) ) ; return $ this -> errorPage ( $ this -> getTranslator ( ) -> trans ( "Sorry, you're not allowed to perform this action" ) , 403 ) ; }
Check current admin user authorisations. An ADMIN role is assumed.

@param mixed $resources a single resource or an array of resources.
@param mixed $modules   a single module or an array of modules.
@param mixed $accesses  a single access or an array of accesses.

@return mixed null if authorization is granted, or a Response object which contains the error page otherwise
Check current admin user authorisations . An ADMIN role is assumed .