On Jun 6, 6:31 am, Vishal <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I have been looking for a way to get a list of the available ACO's for
> a given ARO/user.
>
> There does not appear to be a simple method of any of the ACL objects
> to get the list.

ACL (in general) is not designed for mass querying like that, and to
do so is difficult/error prone/intensive on the db.

However it depends what you mean, in principle you want to query the
aros_acos table.

if you do

loadModel('Aro'); // Just for the example so you can put it in any
controller
$this->Aro = new Aro();// Just for the example so you can put it in
any controller
$directRules = $this->Aro->ArosAco->findAll(array('Aro.id´ = $aroId));

OR

$directOrInheritedRules = $this->Aro->ArosAco->findAll(array('Aro.lft'
=> '< '.$aroLeft, 'Aro.rght' => '> '.$aroRght));

... you will get the list of defined RULES. If you have both granting
and denying rules you will see that it isn't simple to know from the
rules if the user has access or not.

Depending on your requirements, it might be easier to query the system
for each in turn..

hth and if not more details please,

AD


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to