tags:

views:

120

answers:

1

hi i am using cakephp for my project but whille creating acl using command promt. when i run the following command cake schema run create DbAcl it genrate three tables in database. but after puting the following code in users_controller.php. and this command. cake acl view aro it dont create aros.

function index() {

$aro =& $this->Acl->Aro;
//pr($aro); exit;
//Here's all of our group info in an array we can iterate through
$groups = array(
    0 => array(
    'alias' => 'admins'
    ),
    1 => array(
    'alias' => 'guests'
    ),
    2 => array(
    'alias' => 'mangers'
    )
);

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

In order to create your AROs you need to create a view for your index method in the UsersController and after that visit Users/index in your browser. Only after that call cake acl view aro from console. If that doesn't help try to use this tool. It provides user friendly way to create your aros (groups and users) and acos (menus) and manipulate them.

bancer