CakePHP - ACL and Setting ACO -



CakePHP - ACL and Setting ACO -

i'm implementing acl in cakephp app have , seem struggling setting acos. i've been next simple acl controlled application tutorial , i've set aros, acos , aros_acos tables fine, , adding aros via groups/add , users/add works great - added aros table.

now i'm @ part have set acos, , i'm bit lost if i'm honest. tutorial uses console plugin register acos. however, net tuts adds them manually using:

$aco = new aco(); $aco->create(); $aco->save(array( 'model' => 'user', 'foreign_key' => null, 'parent_id' => null, 'alias' => 'user' )); $aco->create(); $aco->save(array( 'model' => 'post', 'foreign_key' => null, 'parent_id' => null, 'alias' => 'post' ));

using manual code we're creating acos user , post controllers whole - that. if wanted set aco edit action user controller? how syntax look?

i think i'd rather code within install_aco() function in controller utilize plugin see.

or...couldn't command access controller/actions using auth without using acl @ all? example, add together 'role' field users table, , in beforefilter() of controllers check role, , redirect user if don't have right role/permission. downside this?

anyway, i'd appreciate help here , many reading.

the next plugin made things easy me implement acl cakephp application:

http://www.alaxos.net/blaxos/pages/view/plugin_acl_2.0

it provides interface not setting permissions mentioned (edit action user controller), acos found throughout application.

you mentioned taking non-acl approach well, , suggest should work fine. check out page on cakephp site, noting isauthorized() parts:

http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html

i've used both ways, have found acl (using above plugin) easier manage.

cakephp acl

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -