Hi hb, I don't know if this will reassure you or frustrate you - but it's not a bug in db_acl. Acl with Auth->authorize = 'actions' works nicely for me for a long time, including in 1.2.4.8284. May I ask, in your AppController::beforeFilter, to what you have set the Auth- >actionPath?
regards, C. On Aug 26, 8:03 pm, housebolt <[email protected]> wrote: > Hi All, > > Currently using version 1.2.4.8284 > > I spent a good half-day trying to get the Auth and Acl components to > play nicely with the Auth::authorize var equal to 'actions' and a > single root ACO node of 'controllers', accessible by the ARO that is > connected to a Group model, which has many users (see the ACL tutorial > in the cakephp cookbook). > > I checked and quadruple checked my aros/acos/aros_acos tables to make > sure everything was properly connected with a very basic setup, but I > was still get an error saying the ACL node could not be found, so I > set about 20 break points and systematically narrowed it down to a > section in the AclNode class. > > I think I've narrowed it down to a problem with the way the > AclNode::node() method handles the controller action info that is > passed to it from the Auth component. There's a section in /cake/libs/ > model/db_acl.php lines 127-133 > > // $result is the ACO that the AclNode has attempted to find, it > returns an array with all of the current ACO row > // info > > if (!isset($result[0][$type]) || > // Here is where the problem is, the $path is an array of the > current controller and action > // This next line tries to compare the ACO 'alias' field to the > current controller action in $path, but if the > // ACO is at root, like 'controllers' in the cookbook tutorial, > the ACO alias is equal to 'controllers', and not a > // controller action, say, 'index'. However the following line is > looking for a controller action and fails the node > // check > (!empty($path) && $result[0][$type]['alias'] != $path[count($path) > - 1]) || > (empty($path) && $result[0][$type]['alias'] != $start) > ) { > return false; > > } > > I'd be interested to see if anyone else has run into this problem. I > basically commented out the bad line (line 129) and then it worked. > > Yes, I'm being lazy right now because I got a little frustrated trying > to figure thing out and now I want to sleep, the real fix will come > once I get some rest. I just wanted to make sure I'm not crazy, if > anyone else wants to verify it. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
