Hi All,
-- I'm currently building my first CakePHP application with the use of Acl.
I followed the tutorial in the documentation and everything I got from that works just fine.
However: I created a custom page/action ('listPosts') and tried to add that action to the Aro-Aco tables using the console ("cake AclExtras.AclExtras aco_sync").
I can see the action in the output that follows:
"Created Aco node: controllers/Posts/listPosts"
I figured that sinds the administrator role should have access to all I didn't have to setup special permissions for this action (it's an admin only action), but re-ran the initDb() just to be sure.
Now every time I go to [site[/posts/listposts I get the following error message:
Warning (512): DbAcl::check() - Failed ACO node lookup in permissions check. Node references: Aro: Array ( [User] => Array ( [id] => 1 [username] => jrenzenb [group_id] => 1 [created] => 2014-05-22 09:34:37 [modified] => 2014-05-22 09:34:37 [Group] => Array ( [id] => 1 [name] => administrators [created] => 2014-05-22 09:33:45 [modified] => 2014-05-22 09:33:45 ) ) ) Aco: controllers/Posts/listposts [CORE/Cake/Model/Permission.php, line 103]
I've read many similar posts about this issue and they all say that there is no entry in the aros_acos table in the database.
If I'm not mistaken this is the entry for the action 'listPosts' in the aros_acos table:
id = 12, aro_id = 1, aco_id = 33 (create, read, update & delete all set to 1)
The aro_id of 1 refers to the administrator group in the aro table and aco_id 33 is the id of the listPost entry in the aco table, witch looks like this:
id = 33, parent_id = 10, model = NULL, foreign_key = NULL, alias = listPosts, lft = 31, rght = 32
This is pretty much where my knowledge ends...
I deleted the tables and build them all over, but even then all actions function as expected except for my custom one...
I must be missing something..
Created Aco node: controllers/Posts/listPosts
Created Aco node: controllers/Posts/listPosts
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment