colap Posted July 10, 2011 Share Posted July 10, 2011 mysql> describe acos; +-------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+--------------+------+-----+---------+----------------+ | id | int(10) | NO | PRI | NULL | auto_increment | | parent_id | int(10) | YES | | NULL | | | model | varchar(255) | YES | | NULL | | | foreign_key | int(10) | YES | | NULL | | | alias | varchar(255) | YES | | NULL | | | lft | int(10) | YES | | NULL | | | rght | int(10) | YES | | NULL | | +-------------+--------------+------+-----+---------+----------------+ 7 rows in set (0.00 sec) mysql> describe aros; +-------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+--------------+------+-----+---------+----------------+ | id | int(10) | NO | PRI | NULL | auto_increment | | parent_id | int(10) | YES | | NULL | | | model | varchar(255) | YES | | NULL | | | foreign_key | int(10) | YES | | NULL | | | alias | varchar(255) | YES | | NULL | | | lft | int(10) | YES | | NULL | | | rght | int(10) | YES | | NULL | | +-------------+--------------+------+-----+---------+----------------+ 7 rows in set (0.00 sec) mysql> describe aros_acos; +---------+------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------+------------+------+-----+---------+----------------+ | id | int(10) | NO | PRI | NULL | auto_increment | | aro_id | int(10) | NO | MUL | NULL | | | aco_id | int(10) | NO | | NULL | | | _create | varchar(2) | NO | | 0 | | | _read | varchar(2) | NO | | 0 | | | _update | varchar(2) | NO | | 0 | | | _delete | varchar(2) | NO | | 0 | | +---------+------------+------+-----+---------+----------------+ 7 rows in set (0.00 sec) How are acos,aros table created? Why are the table structures like that? mysql> select * from aros; +----+-----------+-------+-------------+-------+------+------+ | id | parent_id | model | foreign_key | alias | lft | rght | +----+-----------+-------+-------------+-------+------+------+ | 1 | NULL | Group | 1 | NULL | 1 | 2 | | 2 | NULL | Group | 2 | NULL | 3 | 4 | | 3 | NULL | Group | 3 | NULL | 5 | 6 | | 4 | NULL | Group | 4 | NULL | 7 | 8 | | 5 | NULL | Group | 5 | NULL | 9 | 10 | | 6 | NULL | Group | 6 | NULL | 11 | 12 | | 7 | NULL | Group | 7 | NULL | 13 | 14 | | 8 | NULL | Group | 8 | NULL | 15 | 16 | | 9 | NULL | Group | 9 | NULL | 17 | 18 | | 10 | NULL | Group | 10 | NULL | 19 | 22 | | 11 | NULL | Group | 11 | NULL | 23 | 24 | | 12 | NULL | Group | 12 | NULL | 25 | 28 | | 13 | NULL | Group | 13 | NULL | 29 | 30 | | 14 | NULL | User | 1 | NULL | 31 | 32 | | 15 | NULL | User | 2 | NULL | 33 | 34 | | 16 | NULL | User | 3 | NULL | 35 | 36 | | 17 | 12 | User | 4 | NULL | 26 | 27 | | 18 | 10 | User | 5 | NULL | 20 | 21 | +----+-----------+-------+-------------+-------+------+------+ 18 rows in set (0.02 sec) mysql> select * from acos; +----+-----------+-------+-------------+-------------+------+------+ | id | parent_id | model | foreign_key | alias | lft | rght | +----+-----------+-------+-------------+-------------+------+------+ | 1 | NULL | NULL | NULL | controllers | 1 | 2 | +----+-----------+-------+-------------+-------------+------+------+ 1 row in set (0.00 sec) mysql> select * from aros_acos; Empty set (0.00 sec) Can someone please explain how it works? I can setup user authentication and after successfull authentication it will allow/deny some actions for controllers. So why do we need acl? And when is acl needed/must? Can't understand the concept of acl. I have read the article from cakephp book. Quote Link to comment https://forums.phpfreaks.com/topic/241568-cakephp-acl-question/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.