开发者

please explain cakephp acl parent id and foreign key

I try to understand of acl component but difficult for newbie

but i try to insert data to table and capture screen and make arrow

for to make myself understand and I can' understand foriegn key and parent id

in aro and aco table and other I need example in the case of many role and many aro and aco

I'm student and use cakephp in final project and trying to compose a sentence

thank you for try to understa开发者_高级运维nd my question


Since I find a a bit difficult to understand your question I'm trying to help with these links which explain ACL in CakePHP very good:

Tutorial für ACL controlled app

Explanation of the ACL Component

API-Entry for the ACL Component

But just to explain what the two keys "foreign_key" and "parent_id" are for:

foreign_key

This is used to link an ARO (Access Request Object) to it's correspondent entry in the database. You could, for example, link a user to it's correspondent ARO and benefit from Cakes associations between them and have all information in one place.

parent_id

This is used to build the tree structure of the ACOs (Access Controll Objects). If you provide a parent_id the structure could look like this:

Your_Controller (has id 5)
    Your_First_Method (has id 6 and parent_id 5)
    Your_Second_Method (has id 7 and parent_id 5)

As you can see, you get a nice hierarchic structure of your ACOs.

I hope this helps you in better understanding CakePHPs ACL.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜