ACL cakephp 3

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

ACL cakephp 3

This post has NOT been accepted by the mailing list yet.
Hi, I'm using the ACL component in cakephp 3 https://github.com/mattmemmesheimer/cakephp-3-acl-example...
In my application the users table is called "usuariosexternos" is the only thing that changes with respect to the example.
Therefore in: src/Model/Entity/UsuariosExternos.php:

public function parentNode()
    if (!$this->id) {
        return null;
    if (isset($this->group_id)) {
        $groupId = $this->group_id;
    } else {
        $Users = TableRegistry::get('UsuariosExternos');
        $user = $Users->find('all', ['fields' => ['group_id']])->where(['id' => $this->id])->first();
        $groupId = $user->group_id;
    if (!$groupId) {
        return null;
    return ['Groups' => ['id' => $groupId]];

I searched and the solutions I found did not work for me! I thank you for the help.

The error persists:
AclNode::node() - Couldn't find Aros node identified by "Array ( [Aros0.model] => Users [Aros0.foreign_key] => 51 ) "