Thursday, December 30, 2010

Help, Stuck here: 5.1.3.2 Creating Access Request Objects (AROs) and Access Control Objects (ACOs)

http://book.cakephp.org/view/1245/Defining-Permissions-Cake-s-Database-ACL

Where do we put this script ?

var $components = array('Acl');

function anyAction()
{
$aro =& $this->Acl->Aro;

//Here's all of our group info in an array we can iterate through
$groups = array(
0 => array(
'alias' => 'warriors'
),
1 => array(
'alias' => 'wizards'
),
2 => array(
'alias' => 'hobbits'
),
3 => array(
'alias' => 'visitors'
),
);

//Iterate and create ARO groups
foreach($groups as $data)
{
//Remember to call create() when saving in loops...
$aro->create();

//Save data
$aro->save($data);
}

//Other action logic goes here...
------------------------------

Can someone point this out ?


Thanks. Regards,
Maxim

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: