CakePHP ACL [Failed ARO/ACO node lookup in permissions check]

2011-01-17 Thread DatacenterHellas
Hello.

I have create an application with CakePHP that uses the ACL.

In my database I have this data:

AROS:
=
|__ID__|__PARENT_ID__|__MODEL|__FOREIGN_KEY__|
__ALIAS__|_lft__|_rght_|
=
|__1___|__null_|__Group__|__1__|
__Administrators___|__1__|__4__|
|__2___|__1___|__User___|__1__|
__admin__|__2__|__3__|
|__3___|__null_|__Group__|__2__|
__Accountants |__5__|__6__|
|__4___|__null_|__Group__|__3__|__Database
Admins`|__7__|__8__|
|__5___|__null_|__Group__|__4__|
__Translators__|__9__|__14_|
|__6___|__5___|__User___|__2__|
__engtrans|__10_|__11_|
|__7___|__5___|__User___|__3__|
__esptrans|__12_|__13_|
=

ACOS
=
|__ID__|__PARENT_ID__|__MODEL|__FOREIGN_KEY__|
__ALIAS__|_lft__|_rght_|
=
|__1___|__null_|__null|__null|
__controllers__|__1__|__4__|
|__2___|__1___|__null|__null|
__Groups |__2__|__3__|
|__3___|__null_|__null|__null|
__Users__|__5__|__6__|
=

AROS_ACOS

|__ID__|__ARO_ID__|__ACO_ID__|___CREATE__|___READ__|___UPDATE__|
___DELETE__|

|__1__|__1|__1|__1_|__1___|__1_|
__1__|


and then in my Site I do that

$aco = ''controllers;
$aro = 1;
$this-AccessControll-getPermission($aco, $aros);

and I get this error :

Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in
permissions check.  Node references:
Aro: 1
Aco: controllers [CORE\cake\libs\controller\components\acl.php, line
275]

[Warning - code]
if (empty($aroPath) || empty($acoPath)) {
trigger_error(__(DbAcl::check() - Failed ARO/ACO node
lookup in permissions check.  Node references:\nAro: , true) .
print_r($aro, true) . \nAco:  . print_r($aco, true),
E_USER_WARNING);

[Warning - context]
$aro=   1
$aco=   controllers
$action =   create
$permKeys   =   array(
_create,
_read,
_update,
_delete
)
$aroPath=   false
$acoPath=   array(
array(
Aco = array()
)
)

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: CakePHP ACL [Failed ARO/ACO node lookup in permissions check]

2011-01-17 Thread DragonFlyEye
You actually want to reference the model then the aco in question. For 
example, if you have a Users model and you want to identify a user with an 
id of 1, you would actually write:
User.1

Not simply 1. That's very confusing and ambiguous in the documentation. 
Took me a while to figure it out. Also a heads up: you almost certainly will 
want to use the Console to do a lot of the initial setup for your ACLs. But 
take a careful look at the code, because the --help menus don't explain what 
comes first, the ACO or the ARO in the function call. I put in to have the 
help menu updated - even gave them a patch over at Lighthouse - but I 
haven't seen it yet. I would love to take some time and rewrite parts of the 
ACL documentation in the book but oh, man, is that a tall order.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en