我的产品表:
select * from products;
+------+----------------+
| id | name |
+------+----------------+
| 1 | product XYZ |
| 2 | product XPTO |
| 3 | procudt ABC |
| 4 | procudt QWERTY |
| 5 | procudt 1234 |
+------+----------------+
我可以允许/拒绝某些用户组访问模型“产品”,例如:
$group->id = 3;
$this->Acl->deny($group, 'controllers');
$this->Acl->allow($group, 'controllers/Products');
$group->id = 4;
$this->Acl->deny($group, 'controllers');
$this->Acl->allow($group, 'controllers/Products/view');
但是如何允许/拒绝某些组访问某些特定产品,例如:
$group->id = 5;
$this->Acl->deny($group, 'controllers');
$this->Acl->allow($group, 'product XYZ');
$group->id = 6;
$this->Acl->deny($group, 'controllers');
$this->Acl->allow($group, 'product XPTO');
$this->Acl->allow($group, 'product 1234');
?