0

I want to hide the button/link based on ACO. Please help me how to do it in cakephp 3 as for cakephp2 we can do it by follow this link.

I need alternative of following for cakephp3:

public function index() {
// These all return true:
$this->Acl->check('warriors/Aragorn', 'Weapons');
$this->Acl->check('warriors/Aragorn', 'Weapons', 'create');
$this->Acl->check('warriors/Aragorn', 'Weapons', 'read');
}
Gurpreet Kaur
  • 19
  • 1
  • 7
  • 1
    Cakephp 3 does not have ACL. This link might help https://stackoverflow.com/questions/27728798/authorization-and-acl-in-cakephp-3 – Sehdev Sep 21 '18 at 13:12
  • Yes, I followed the solution from [link](https://stackoverflow.com/questions/27728798/authorization-and-acl-in-cakephp-3). Now i getting following error: Warning (512): DbAcl::check() - Failed ARO node lookup in permissions check. Node references: Aro: admin/admin Aco: Users [ROOT\vendor\cakephp\acl\src\Model\Table\PermissionsTable.php, line 76] – Gurpreet Kaur Sep 21 '18 at 15:31
  • Check this https://stackoverflow.com/questions/8049637/dbaclcheck-failed-aro-aco-node-lookup-in-permissions-check – Sehdev Sep 22 '18 at 14:08

0 Answers0