Beaucoup d'erreurs avec le tuto de Grafikart (une page d'erreur et +)

Par domix24, il y a 15 ans


Bonjour, en faisant le tuto acl de grafikart, je suit tombée face a cette page rempli d'erreur
pouvez-vous m'aider a les corriger?
Merci


Warning (512): AclNode::node() - Couldn't find Aro node identified by "Array
(
[Aro0.model] => Group
[Aro0.foreign_key] => 1
)
" [CORE\cake\libs\model\db_acl.php, line 191]
Code | Context
$ref = array(
"Aro0.model" => "Group",
"Aro0.foreign_key" => 1
)
$this = Aro
Aro::$name = "Aro"
Aro::$hasAndBelongsToMany = array
Aro::$cacheQueries = false
Aro::$actsAs = array
Aro::$useDbConfig = "default"
Aro::$useTable = "aros"
Aro::$displayField = "id"
Aro::$id = false
Aro::$data = array
Aro::$table = "aros"
Aro::$primaryKey = "id"
Aro::$_schema = array
Aro::$validate = array
Aro::$validationErrors = array
Aro::$tablePrefix = ""
Aro::$alias = "Aro"
Aro::$tableToModel = array
Aro::$logTransactions = false
Aro::$belongsTo = array
Aro::$hasOne = array
Aro::$hasMany = array
Aro::$Behaviors = BehaviorCollection object
Aro::$whitelist = array
Aro::$cacheSources = true
Aro::$findQueryType = NULL
Aro::$recursive = 1
Aro::$order = NULL
Aro::$virtualFields = array
Aro::$__associationKeys = array
Aro::$__associations = array
Aro::$__backAssociation = array
Aro::$__insertID = NULL
Aro::$__numRows = NULL
Aro::$__affectedRows = NULL
Aro::$_findMethods = array
Aro::$Aco = Aco object
Aro::$Permission = Permission object
$db = DboMysqli
DboMysqli::$description = "Mysqli DBO Driver"
DboMysqli::$_baseConfig = array
DboMysqli::$startQuote = "" DboMysqli::$endQuote = ""
DboMysqli::$_useAlias = true
DboMysqli::$_commands = array
DboMysqli::$fieldParameters = array
DboMysqli::$tableParameters = array
DboMysqli::$columns = array
DboMysqli::$index = array
DboMysqli::$alias = "AS "
DboMysqli::$methodCache = array
DboMysqli::$cacheMethods = true
DboMysqli::$__bypass = true
DboMysqli::$__sqlOps = array
DboMysqli::$virtualFieldSeparator = "__"
DboMysqli::$connected = true
DboMysqli::$fullDebug = true
DboMysqli::$error = NULL
DboMysqli::$affected = 0
DboMysqli::$numRows = 0
DboMysqli::$took = 2
DboMysqli::$_result = mysqli_result object
DboMysqli::$_queriesCnt = 7
DboMysqli::$_queriesTime = 55
DboMysqli::$_queriesLog = array
DboMysqli::$_queriesLogMax = 200
DboMysqli::$_queryCache = array
DboMysqli::$__descriptions = array
DboMysqli::$_sources = array
DboMysqli::$connection = mysqli object
DboMysqli::$config = array
DboMysqli::$configKeyName = "default"
DboMysqli::$_transactionStarted = false
DboMysqli::$cacheSources = true
DboMysqli::$results = mysqli_result object
DboMysqli::$map = array
DboMysqli::$__booleans = array
$type = "Aro"
$result = array()
$table = "aros"
$val = 1
$key = "foreign_key"
$queryData = array(
"conditions" => array(
"Aro0.model" => "Group",
"Aro0.foreign_key" => 1
),
"fields" => array(
"id",
"parent_id",
"model",
"foreign_key",
"alias"
),
"joins" => array(
array()
),
"order" => "Aro.lft DESC"
)
AclNode::node() - CORE\cake\libs\model\db_acl.php, line 191
DbAcl::getAclLink() - CORE\cake\libs\controller\components\acl.php, line 462
DbAcl::allow() - CORE\cake\libs\controller\components\acl.php, line 356
AclComponent::allow() - CORE\cake\libs\controller\components\acl.php, line 106
LabController::setacl() - APP\controllers\lab_controller.php, line 13
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 204
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171
[main] - APP\webroot\index.php, line 83
Warning (512): DbAcl::allow() - Invalid node [CORE\cake\libs\controller\components\acl.php, line 361]
Code | Context

if ($perms == false) {
trigger_error(__('DbAcl::allow() - Invalid node', true), E_USER_WARNING);
$aro = Group
Group::$actsAs = array
Group::$useDbConfig = "default"
Group::$useTable = "groups"
Group::$displayField = "name"
Group::$id = 1
Group::$data = array
Group::$table = "groups"
Group::$primaryKey = "id"
Group::$_schema = array
Group::$validate = array
Group::$validationErrors = array
Group::$tablePrefix = ""
Group::$name = "Group"
Group::$alias = "Group"
Group::$tableToModel = array
Group::$logTransactions = false
Group::$cacheQueries = false
Group::$belongsTo = array
Group::$hasOne = array
Group::$hasMany = array
Group::$hasAndBelongsToMany = array
Group::$Behaviors = BehaviorCollection object
Group::$whitelist = array
Group::$cacheSources = true
Group::$findQueryType = NULL
Group::$recursive = 1
Group::$order = NULL
Group::$virtualFields = array
Group::$__associationKeys = array
Group::$__associations = array
Group::$__backAssociation = array
Group::$__insertID = NULL
Group::$__numRows = NULL
Group::$__affectedRows = NULL
Group::$_findMethods = array
Group::$Aro = Aro object
$aco = "controllers"
$actions = "*"
$value = 1
$perms = false
$permKeys = array(
"_create",
"_read",
"_update",
"_delete"
)
$save = array()
DbAcl::allow() - CORE\cake\libs\controller\components\acl.php, line 361
AclComponent::allow() - CORE\cake\libs\controller\components\acl.php, line 106
LabController::setacl() - APP\controllers\lab_controller.php, line 13
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 204
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171
[main] - APP\webroot\index.php, line 83
Warning (512): AclNode::node() - Couldn't find Aro node identified by "Array
(
[Aro0.model] => Group
[Aro0.foreign_key] => 2
)
" [CORE\cake\libs\model\db_acl.php, line 191]
Code | Context

if (!$result) {
trigger_error(sprintf(__("AclNode::node() - Couldn't find %s node identified by \"%s\"", true), $type, print_r($ref, true)), E_USER_WARNING);
$ref = array(
"Aro0.model" => "Group",
"Aro0.foreign_key" => 2
)
$this = Aro
Aro::$name = "Aro"
Aro::$hasAndBelongsToMany = array
Aro::$cacheQueries = false
Aro::$actsAs = array
Aro::$useDbConfig = "default"
Aro::$useTable = "aros"
Aro::$displayField = "id"
Aro::$id = false
Aro::$data = array
Aro::$table = "aros"
Aro::$primaryKey = "id"
Aro::$_schema = array
Aro::$validate = array
Aro::$validationErrors = array
Aro::$tablePrefix = ""
Aro::$alias = "Aro"
Aro::$tableToModel = array
Aro::$logTransactions = false
Aro::$belongsTo = array
Aro::$hasOne = array
Aro::$hasMany = array
Aro::$Behaviors = BehaviorCollection object
Aro::$whitelist = array
Aro::$cacheSources = true
Aro::$findQueryType = NULL
Aro::$recursive = 1
Aro::$order = NULL
Aro::$virtualFields = array
Aro::$__associationKeys = array
Aro::$__associations = array
Aro::$__backAssociation = array
Aro::$__insertID = NULL
Aro::$__numRows = NULL
Aro::$__affectedRows = NULL
Aro::$_findMethods = array
Aro::$Aco = Aco object
Aro::$Permission = Permission object
$db = DboMysqli
DboMysqli::$description = "Mysqli DBO Driver"
DboMysqli::$_baseConfig = array
DboMysqli::$startQuote = "" DboMysqli::$endQuote = ""
DboMysqli::$_useAlias = true
DboMysqli::$_commands = array
DboMysqli::$fieldParameters = array
DboMysqli::$tableParameters = array
DboMysqli::$columns = array
DboMysqli::$index = array
DboMysqli::$alias = "AS "
DboMysqli::$methodCache = array
DboMysqli::$cacheMethods = true
DboMysqli::$__bypass = true
DboMysqli::$__sqlOps = array
DboMysqli::$virtualFieldSeparator = "__"
DboMysqli::$connected = true
DboMysqli::$fullDebug = true
DboMysqli::$error = NULL
DboMysqli::$affected = 0
DboMysqli::$numRows = 0
DboMysqli::$took = 0
DboMysqli::$_result = mysqli_result object
DboMysqli::$_queriesCnt = 9
DboMysqli::$_queriesTime = 56
DboMysqli::$_queriesLog = array
DboMysqli::$_queriesLogMax = 200
DboMysqli::$_queryCache = array
DboMysqli::$__descriptions = array
DboMysqli::$_sources = array
DboMysqli::$connection = mysqli object
DboMysqli::$config = array
DboMysqli::$configKeyName = "default"
DboMysqli::$_transactionStarted = false
DboMysqli::$cacheSources = true
DboMysqli::$results = mysqli_result object
DboMysqli::$map = array
DboMysqli::$__booleans = array
$type = "Aro"
$result = array()
$table = "aros"
$val = 2
$key = "foreign_key"
$queryData = array(
"conditions" => array(
"Aro0.model" => "Group",
"Aro0.foreign_key" => 2
),
"fields" => array(
"id",
"parent_id",
"model",
"foreign_key",
"alias"
),
"joins" => array(
array()
),
"order" => "Aro.lft DESC"
)
AclNode::node() - CORE\cake\libs\model\db_acl.php, line 191
DbAcl::getAclLink() - CORE\cake\libs\controller\components\acl.php, line 462
DbAcl::allow() - CORE\cake\libs\controller\components\acl.php, line 356
DbAcl::deny() - CORE\cake\libs\controller\components\acl.php, line 408
AclComponent::deny() - CORE\cake\libs\controller\components\acl.php, line 120
LabController::setacl() - APP\controllers\lab_controller.php, line 16
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 204
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171
[main] - APP\webroot\index.php, line 83
Warning (512): AclNode::node() - Couldn't find Aro node identified by "Array
(
[Aro0.model] => Group
[Aro0.foreign_key] => 3
)
" [CORE\cake\libs\model\db_acl.php, line 191]
Code | Context

if (!$result) {
trigger_error(sprintf(__("AclNode::node() - Couldn't find %s node identified by \"%s\"", true), $type, print_r($ref, true)), E_USER_WARNING);
$ref = array(
"Aro0.model" => "Group",
"Aro0.foreign_key" => 3
)
$this = Aro
Aro::$name = "Aro"
Aro::$hasAndBelongsToMany = array
Aro::$cacheQueries = false
Aro::$actsAs = array
Aro::$useDbConfig = "default"
Aro::$useTable = "aros"
Aro::$displayField = "id"
Aro::$id = false
Aro::$data = array
Aro::$table = "aros"
Aro::$primaryKey = "id"
Aro::$_schema = array
Aro::$validate = array
Aro::$validationErrors = array
Aro::$tablePrefix = ""
Aro::$alias = "Aro"
Aro::$tableToModel = array
Aro::$logTransactions = false
Aro::$belongsTo = array
Aro::$hasOne = array
Aro::$hasMany = array
Aro::$Behaviors = BehaviorCollection object
Aro::$whitelist = array
Aro::$cacheSources = true
Aro::$findQueryType = NULL
Aro::$recursive = 1
Aro::$order = NULL
Aro::$virtualFields = array
Aro::$__associationKeys = array
Aro::$__associations = array
Aro::$__backAssociation = array
Aro::$__insertID = NULL
Aro::$__numRows = NULL
Aro::$__affectedRows = NULL
Aro::$_findMethods = array
Aro::$Aco = Aco object
Aro::$Permission = Permission object
$db = DboMysqli
DboMysqli::$description = "Mysqli DBO Driver"
DboMysqli::$_baseConfig = array
DboMysqli::$startQuote = "" DboMysqli::$endQuote = ""
DboMysqli::$_useAlias = true
DboMysqli::$_commands = array
DboMysqli::$fieldParameters = array
DboMysqli::$tableParameters = array
DboMysqli::$columns = array
DboMysqli::$index = array
DboMysqli::$alias = "AS "
DboMysqli::$methodCache = array
DboMysqli::$cacheMethods = true
DboMysqli::$__bypass = true
DboMysqli::$__sqlOps = array
DboMysqli::$virtualFieldSeparator = "__"
DboMysqli::$connected = true
DboMysqli::$fullDebug = true
DboMysqli::$error = NULL
DboMysqli::$affected = 0
DboMysqli::$numRows = 0
DboMysqli::$took = 1
DboMysqli::$_result = mysqli_result object
DboMysqli::$_queriesCnt = 13
DboMysqli::$_queriesTime = 64
DboMysqli::$_queriesLog = array
DboMysqli::$_queriesLogMax = 200
DboMysqli::$_queryCache = array
DboMysqli::$__descriptions = array
DboMysqli::$_sources = array
DboMysqli::$connection = mysqli object
DboMysqli::$config = array
DboMysqli::$configKeyName = "default"
DboMysqli::$_transactionStarted = false
DboMysqli::$cacheSources = true
DboMysqli::$results = mysqli_result object
DboMysqli::$map = array
DboMysqli::$__booleans = array
$type = "Aro"
$result = array()
$table = "aros"
$val = 3
$key = "foreign_key"
$queryData = array(
"conditions" => array(
"Aro0.model" => "Group",
"Aro0.foreign_key" => 3
),
"fields" => array(
"id",
"parent_id",
"model",
"foreign_key",
"alias"
),
"joins" => array(
array()
),
"order" => "Aro.lft DESC"
)
AclNode::node() - CORE\cake\libs\model\db_acl.php, line 191
DbAcl::getAclLink() - CORE\cake\libs\controller\components\acl.php, line 462
DbAcl::allow() - CORE\cake\libs\controller\components\acl.php, line 356
DbAcl::deny() - CORE\cake\libs\controller\components\acl.php, line 408
AclComponent::deny() - CORE\cake\libs\controller\components\acl.php, line 120
LabController::setacl() - APP\controllers\lab_controller.php, line 20
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 204
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171
[main] - APP\webroot\index.php, line 83


d'apres tout sa, j'ai beaucoup d'erreur dans ce ficher

<?php
class LabController extends AppController{
        var $uses = array('User', 'Group');
        function beforeFilter(){
            parent::beforeFilter();
            $this->Auth->allow(array('*'));
        }
        function setacl(){
            $this->Group->id = 1;
            $this->Acl->allow($this->Group, 'controllers');
            $this->Group->id = 2;
            $this->Acl->deny($this->Group, 'controllers');
            $this->Acl->allow($this->Group, 'controllers/Posts');
            $this->Group->id = 3;
            $this->Acl->deny($this->Group, 'controllers');
            $this->Acl->allow($this->Group, 'controllers/Posts/index');
            echo 'ok cool';
            exit;
        }
        function build_acl() {
        if (!Configure::read('debug')) {
            return $this->_stop();
        }
        $log = array();
        $aco =& $this->Acl->Aco;
        $root = $aco->node('controllers');
        if (!$root) {
            $aco->create(array('parent_id' => null, 'model' => null, 'alias' => 'controllers'));
            $root = $aco->save();
            $root'Aco']'id'] = $aco->id;
            $log] = 'Created Aco node for controllers';
        } else {
            $root = $root[0];
        }
        App::import('Core', 'File');
        $Controllers = Configure::listObjects('controller');
        $appIndex = array_search('App', $Controllers);
        if ($appIndex !== false ) {
            unset($Controllers$appIndex]);
        }
        $baseMethods = get_class_methods('Controller');
        $baseMethods] = 'buildAcl';
        $Plugins = $this->_getPluginControllerNames();
        $Controllers = array_merge($Controllers, $Plugins);
        // look at each controller in app/controllers
        foreach ($Controllers as $ctrlName) {
            $methods = $this->_getClassMethods($this->_getPluginControllerPath($ctrlName));
            // Do all Plugins First
            if ($this->_isPlugin($ctrlName)){
                $pluginNode = $aco->node('controllers/'.$this->_getPluginName($ctrlName));
                if (!$pluginNode) {
                    $aco->create(array('parent_id' => $root'Aco']'id'], 'model' => null, 'alias' => $this->_getPluginName($ctrlName)));
                    $pluginNode = $aco->save();
                    $pluginNode'Aco']'id'] = $aco->id;
                    $log] = 'Created Aco node for ' . $this->_getPluginName($ctrlName) . ' Plugin';
                }
            }
            // find / make controller node
            $controllerNode = $aco->node('controllers/'.$ctrlName);
            if (!$controllerNode) {
                if ($this->_isPlugin($ctrlName)){
                    $pluginNode = $aco->node('controllers/' . $this->_getPluginName($ctrlName));
                    $aco->create(array('parent_id' => $pluginNode'0']'Aco']'id'], 'model' => null, 'alias' => $this->_getPluginControllerName($ctrlName)));
                    $controllerNode = $aco->save();
                    $controllerNode'Aco']'id'] = $aco->id;
                    $log] = 'Created Aco node for ' . $this->_getPluginControllerName($ctrlName) . ' ' . $this->_getPluginName($ctrlName) . ' Plugin Controller';
                } else {
                    $aco->create(array('parent_id' => $root'Aco']'id'], 'model' => null, 'alias' => $ctrlName));
                    $controllerNode = $aco->save();
                    $controllerNode'Aco']'id'] = $aco->id;
                    $log] = 'Created Aco node for ' . $ctrlName;
                }
            } else {
                $controllerNode = $controllerNode[0];
            }
            //clean the methods. to remove those in Controller and private actions.
            foreach ($methods as $k => $method) {
                if (strpos($method, '_', 0) === 0) {
                    unset($methods$k]);
                    continue;
                }
                if (in_array($method, $baseMethods)) {
                    unset($methods$k]);
                    continue;
                }
                $methodNode = $aco->node('controllers/'.$ctrlName.'/'.$method);
                if (!$methodNode) {
                    $aco->create(array('parent_id' => $controllerNode'Aco']'id'], 'model' => null, 'alias' => $method));
                    $methodNode = $aco->save();
                    $log] = 'Created Aco node for '. $method;
                }
            }
        }
        if(count($log)>0) {
            debug($log);
        }
    }
    function _getClassMethods($ctrlName = null) {
        App::import('Controller', $ctrlName);
        if (strlen(strstr($ctrlName, '.')) > 0) {
            // plugin's controller
            $num = strpos($ctrlName, '.');
            $ctrlName = substr($ctrlName, $num+1);
        }
        $ctrlclass = $ctrlName . 'Controller';
        $methods = get_class_methods($ctrlclass);
        // Add scaffold defaults if scaffolds are being used
        $properties = get_class_vars($ctrlclass);
        if (array_key_exists('scaffold',$properties)) {
            if($properties'scaffold'] == 'admin') {
                $methods = array_merge($methods, array('admin_add', 'admin_edit', 'admin_index', 'admin_view', 'admin_delete'));
            } else {
                $methods = array_merge($methods, array('add', 'edit', 'index', 'view', 'delete'));
            }
        }
        return $methods;
    }
    function _isPlugin($ctrlName = null) {
        $arr = String::tokenize($ctrlName, '/');
        if (count($arr) > 1) {
            return true;
        } else {
            return false;
        }
    }
    function _getPluginControllerPath($ctrlName = null) {
        $arr = String::tokenize($ctrlName, '/');
        if (count($arr) == 2) {
            return $arr[0] . '.' . $arr[1];
        } else {
            return $arr[0];
        }
    }
    function _getPluginName($ctrlName = null) {
        $arr = String::tokenize($ctrlName, '/');
        if (count($arr) == 2) {
            return $arr[0];
        } else {
            return false;
        }
    }
    function _getPluginControllerName($ctrlName = null) {
        $arr = String::tokenize($ctrlName, '/');
        if (count($arr) == 2) {
            return $arr[1];
        } else {
            return false;
        }
    }
/**
 * Get the names of the plugin controllers ...
 *
 * This function will get an array of the plugin controller names, and
 * also makes sure the controllers are available for us to get the
 * method names by doing an App::import for each plugin controller.
 *
 * @return array of plugin names.
 *
 */
    function _getPluginControllerNames() {
        App::import('Core', 'File', 'Folder');
        $paths = Configure::getInstance();
        $folder =& new Folder();
        $folder->cd(APP . 'plugins');
        // Get the list of plugins
        $Plugins = $folder->read();
        $Plugins = $Plugins[0];
        $arr = array();
        // Loop through the plugins
        foreach($Plugins as $pluginName) {
            // Change directory to the plugin
            $didCD = $folder->cd(APP . 'plugins'. DS . $pluginName . DS . 'controllers');
            // Get a list of the files that have a file name that ends
            // with controller.php
            $files = $folder->findRecursive('.*_controller\.php');
            // Loop through the controllers we found in the plugins directory
            foreach($files as $fileName) {
                // Get the base file name
                $file = basename($fileName);
                // Get the controller name
                $file = Inflector::camelize(substr($file, 0, strlen($file)-strlen('_controller.php')));
                if (!preg_match('/^'. Inflector::humanize($pluginName). 'App/', $file)) {
                    if (!App::import('Controller', $pluginName.'.'.$file)) {
                        debug('Error importing '.$file.' for plugin '.$pluginName);
                    } else {
                        /// Now prepend the Plugin name ...
                        // This is required to allow us to fetch the method names.
                        $arr] = Inflector::humanize($pluginName) . "/" . $file;
                    }
                }
            }
        }
        return $arr;
    }
}
?>

22 réponses

furax84, il y a 15 ans

Par contre si tu as router tes actions avec admin, penses à mettre admin_index au lieu de index
Amicalement

domix24, il y a 15 ans

et mon erreur?

furax84, il y a 15 ans

Ton erreur doit venir de la, postes justes les lignes des droit stp

domix24, il y a 15 ans

je ne suis pas sur de comprendre, c'est quoi les lignes des droits?

furax84, il y a 15 ans

Salut

Moi aussi j'ai eu cette erreur pour la résoudre préfère

$group->id = 1;
$this->Acl->allow($group, 'controllers');

à

$this->Group->id = 1;  
$this->Acl->allow($this->Group, 'controllers');

mais avant relance ton action build_acl.
Amicalement

PS: si la réponse te conviens mais le sujet en résolu

domix24, il y a 15 ans

Merci mais j'ai fait ce que tu m'a dit mais il me reste une erreur


Warning (512): DbAcl::allow() - Invalid node [CORE\cake\libs\controller\components\acl.php, line 361]
Code | Context
$aro = stdClass
stdClass::$id = 1
$aco = "controllers"
$actions = "*"
$value = 1
$perms = false
$permKeys = array(
"_create",
"_read",
"_update",
"_delete"
)
$save = array()
DbAcl::allow() - CORE\cake\libs\controller\components\acl.php, line 361
AclComponent::allow() - CORE\cake\libs\controller\components\acl.php, line 106
LabController::setacl() - APP\controllers\lab_controller.php, line 13
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 204
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171
[main] - APP\webroot\index.php, line 83

furax84, il y a 15 ans

Les lignes que je t'ai demandé de modifier la première fois :-)

domix24, il y a 15 ans

voici les " Lignes des Droits"

function setacl(){
            $group->id = 1;
            $this->Acl->allow($group, 'controllers');
            $group->id = 2;
            $this->Acl->deny($group, 'controllers');
            $this->Acl->allow($group, 'controllers/Posts');
            $group->id = 3;
            $this->Acl->deny($group, 'controllers');
            $this->Acl->allow($group, 'controllers/Posts/index');
            echo 'ok cool';
            exit();
        }
furax84, il y a 15 ans

Salut à toi

Ca m'a l'air d'aller
Tu devrais controller les befores_filter de tous tes controller et aussi penser à ajouter 'Session' dans tes helpers.

Amicalement

domix24, il y a 15 ans

Il est insérer a Partir d'un AppController (le helper session)

(Tu devrais controller les befores_filter de tous tes controller)Je ne suis pas sur de comprendre.

domix24, il y a 15 ans

Bonjour,
Juste pour vous dire que mon probleme est toujours non-résolu.
J'ai encore besoin de vous pour m'aider.
Merci

domix24, il y a 15 ans

:-<

domix24, il y a 15 ans

Personne pour m'aider?

domix24, il y a 15 ans

je n'aime pas flooder mais j'aimerai bien avoir une réponse a mon problème

red-ace, il y a 15 ans

D'après mes connaissances en PHP, l’erreur est dans le fichier CORE\cake\libs\controller\components\acl.php, si je ne m'abuse, il faut que tu re-télécharges ce fichier.

domix24, il y a 15 ans

J'ai essayé mais sans succès.

palmer08, il y a 15 ans

Va voir du côté de la doc de CakePHP sur les ACL.

Note: C'est le tuto que Grafikart a utilisé :)

domix24, il y a 15 ans

J'ai tout refait et j'ai toujours la même erreur

domix24, il y a 15 ans

Un peu d'aide s'il vous plait.
Merci

domix24, il y a 15 ans

bonjour,
j'ai refait plusieurs fois le tuto de grafikart mais je suis n'est pas d'erreur mais mes groupes utilisateurs on droit a tout,

function setacl(){
            $this->Group->id = 1;
            $this->Acl->allow($this->Group, 'controllers');
            $this->Group->id = 2;
            $this->Acl->deny($this->Group, 'controllers');
            $this->Acl->allow($this->Group, 'controllers/Posts');
            $this->Group->id = 3;
            $this->Acl->deny($this->Group, 'controllers');
            $this->Acl->allow($this->Group, 'controllers/Posts/index');
            echo 'Tout est ok';
        }
Grafikart, il y a 15 ans

Tu as bien pensé a retiré les $this->Auth->allow() de tes beforeFilter? Bien pensé a faire de parent::beforeFilter() dans tous les beforeFilter de tes controller ?

domix24, il y a 15 ans

Merci Grafikart, je ne savait pas qu'il fallait ôter le $this->Auth->allow(array('*')); dans chaque controller