I'm implementing the CakePHP ACL. I want my Model to both be a requester and controlled, so I've set it up like this:
public $actsAs = array(
'Acl' => array(
'type' => 'both'
)
);
The problem I'm having, is that my Model has a different parent depending on the type of node (ACO or ARO) it is.
I would like to solve it by doing something like this with the parentNode() function:
public function parentNode() {
if('ARO' == $this->type) {
return 'ARO parent';
} else {
return 'ACO parent';
}
}
So basically let it return the appropriate parent for each of the cases.
Is this possible, and if so, how?
===== UPDATE - 2013-10-04 =====
I've submitted an official ticket which is being looked at :-)