Both Aro, Aco and Acl on CakePHP's builtin ACL are standard tables. Just add
them as models to your controller:

var $uses = array ('Aro', 'Aco');

And then use them as a regular model. If you are curious as to how they are
built, look into for example Aro at
cake/libs/controller/components/dbacl/models/aro.php and you'll see that it
is defined as:

class Aro extends AclNode

And cake/libs/controller/components/dbacl/models/acl_node.php is defined as:

class AclNode extends AppModel

So it is a regular model for you, so you can do stuff like:

$newAlias = 'New Alias for my ARO';

$conditions = array (
        'Aro.alias' => 'my_aro'
);

$result = $this->Aro->find($conditions, null, null, 0);

if ($result !== false)
{
        $this->Aro->id = $result['Aro']['id'];
        $this->Aro->saveField('alias', $newAlias);
}

Remember, whatever is on CakePHP database can be modelized.

-MI

---------------------------------------------------------------------------

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-----Mensaje original-----
De: [email protected] [mailto:[EMAIL PROTECTED] En nombre
de [EMAIL PROTECTED]
Enviado el: Viernes, 02 de Marzo de 2007 02:56 p.m.
Para: Cake PHP
Asunto: ACL problem

So. What happens when a user's username changes?  The new username
does not appear as a valid alias in the ARO table.  If I do a
check('newusername', 'someAco') it will return false.  I can't seem to
find a method to update the alias of an ARO object, or to copy the
permissions of one ARO to another.


--~--~---------~--~----~------------~-------~--~----~
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