On the CakePHP website it shows that you would create a users table and a groups table for users and user groups using ACL: http://book.cakephp.org/view/1544/Preparing-our-Application
However most other tutorials e.g. NetTuts shows creating three tables (in addition to the users table) to use 开发者_如何学JAVAACL: http://net.tutsplus.com/tutorials/php/how-to-use-cakephps-access-control-lists/
What is the difference between the two? Thanls
if you are asking about the extra tables named Acos,Aros and aros_acos
In both tutorial we need to use these tables.In the cakephp.org. there is a section called Initialize the Db Acl tables where they running a command to create those tables. where as in nettuts they showing us creating it manually.
Any way cakePHP need 5 tables to run the ACL perfectly.In that Acos,Aros and aros_acos are cakePHP defined tables and Users and Groups are user defined tables.
CakePHP is storing the User permissions as a Tree with Aros(Access Request Objects means users) hasAndBeongsToMany relation with Acos (Access Control Objects means actions)
精彩评论