私の製品テーブル:
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');
?