tags:

views:

43

answers:

1

I'm getting a weird error when running through the tutorial in the e-book, "Practical CakePHP Projects" in chapter 8, "A Cake Control Panel". Everything is built out, the DB is set-up and completely blank, and I'm running through the test at the end of the chapter to verify everything is working... I'm not sure what happened, but I keep running into the following error:

Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in permissions check.  Node references:
Aro: Array
(
    [User] => Array
        (
            [id] => 2
            [username] => admin
            [group_id] => 1
            [created] => 2010-07-05 12:07:45
            [modified] => 2010-07-05 12:08:00                
        )

)

It looks like it's telling me that there is no node in my Aro that is identified by the model 'User' with the id of '2'. But looking at my Aros table, I can clearly see that the last record is the following:

id:4, parent_id:2, model:User, foreign_key:2, alias:User:2, lft:2, rght:3

And the following relative record is my users table:

id:2, username:admin, password:hashed, group_id:1, created:date, modified:date

Where am I going wrong? Any direction someone could point me in would be greatly appreciated.

Thanks!

A: 

It seems for me that you either do not have corresponding record in acos table or permission in acos_aros. If that is the case you will need to add $this->Auth->allow('*'); in beforeFilter() in you app_controller.php and after that add ACO(s) and allow it to admin user.

I would advice you to follow official tutorial Simple Acl controlled Application because the information in the book becomes outdated. Something may not work with CakePHP 1.3.

bancer
Thanks for the response. I actually went into my app_controller and added 'display' to my array of allowedActions in the Auth component. Now, instead of receiving that error, I get redirected back to my home page... I'm not 100% sure why, but I think I'm heading in the right direction.
Imperatorr
If you are redirected that's probably because you do not have the permission to access the page you have requested.
bancer