I have one MySQL DB table as below resource table :
+----+-----------+------------+
| id | name | type |
+----+-----------+------------+
| 1 | guest | user |
| 2 | member | user |
| 3 | moderator | user |
| 4 | owner | user |
| 5 | admin | user |
| 6 | index | controller |
+----+-----------+------------+
The following table is a table of rules :
+----+---------+------+-------------+----------------------+
| id | user_id | rule | resource_id | extras |
+----+---------+------+-------------+----------------------+
| 1 | 2 | 3 | 1 | null |
| 2 | 3 | 3 | 2 | null |
| 3 | 4 | 3 | 3 | null |
| 4 | 5 | 3 | 4 | null |
| 5 | 6 | 1 | 1 | index,login,register |
| 6 | 6 | 2 | 2 | login,register |
| 7 | 6 | 1 | 2 | logout |
+----+---------+------+-------------+----------------------+
OK, sorry for the length, but I'm trying to give a complete picture of what I'm trying to do. Thus, how it works, the role (as a user) can be given (typically: 1) access to the controller, the role can inherit (Rule 3), another role or role and rejected (rule 2) access to the controller. (A user is a resource, and a controller is a resource)
Access to actions is granted / denied using the additional parameters column.
, ACL zend.
, , ; , , , . . , , , . , .
, .
, .
.
, . . , : index. ( , )
. , , Zend MVC (PHP) MySQL.
persudo - , .
P.S. , ACL - PHP/MySQL?
, , , , GUI ( ). , .