CakePHP 2.1 Authentication: AclExtras does not pop

2019-08-31 05:38发布

问题:

I have followed this tutorial to build an ACL/ACO controlled app: http://book.cakephp.org/2.0/en/tutorials-and-examples/simple-acl-controlled-application/simple-acl-controlled-application.html

I have downloaded the AclExtras plugin, put it into my app/Plugins folder, and executed the command ./Console/cake AclExtras.AclExtras aco_update, as described in the tutorial, which gives me Aco Update Complete. But when I look into my acos table, the only thing it has done is add the following row, nothing else:

(CSV)
id;parent_id;model;foreign_key;alias;lft;rght
5;1;NULL;NULL;AclExtras;2;3

The controllers root row is already there. I've got nine Models with several actions each, but AclExtras does not add them. When I try to log in, I'm sent back to the login form, though my group has full access to the controllers root. I think it's because all the rest of the acos are missing.

Thanks in advance!

回答1:

aco_sycn syncs the ACOs based on the controllers (at least with that tutorial). Each method is an ACO, so if you don't have any controllers or controller methods then nothing will be synced.