On 26 Apr., 07:09, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I was just wondering if anyone is successfully using cakephpAcland
> the new AuthComponent in 1.2?
>
> If so, could you give us mortals some guidance in setting it up? It
> looks as thoughAclhas changed significantly from 1.1.
>
> Here is some of what I have managed to peace together so far...
>
> //add theACLcomponent
> var $components = array('Acl');
>
> //get the aro model
> $aro = $this->Acl->Aro;
>
> //create a new aro for User:scook, related to a user in the Users
> table
> $aro->create( array('model' => 'User', 'foreign_key' => 2, 'alias' =>
> 'scook') );
>
> //save the new aro
> $aro->save();
>
> //get the aco model
> $aco = $this->Acl->Aco;
>
> //create an aco for my Clients controller
> $aco->create( array('foreign_key' => 0, 'alias' => 'Clients') );
>
> //save the new aco
> $aco->save();
>
> //create an aco for the index action of my Clients controller
> $aco->create( array('parent_id'=>'[id of Client Aco]', 'foreign_key'
> => 0, 'alias' => 'Index') );
>
> //save the new aco
> $aco->save();
>
> //grant User:scook access to the Clients controller
> $this->Acl->allow('scook','Clients');
>
> So now I can accesswww.site.com/clients/index
>
> 1. Is everything I have done so far correct and reasonable?
>
> 2. How do I allow User:scook access to ALL of the Clients > actions,
> without adding an aco for each action? I have tried using "*" and "/",
> but no luck.
>
> 3. Can I exclude certain controllers and/or actions from being
> checked? It seems that if I include theAuthComponent, then every
> single action is automatically checked. But if the user is not logged
> in, theaclcheck will deny access to any action (including login). If
> that is the case, how do I access the login action?
>
> Any insight would be appreciated.
>
> cook

Servus,

Well i am a newbe, but very interesseted in the ACL component. But i
could not even get close to what you have already managed. So i wonder
if you could help me a bit... i loaded the component:

var $components = array('Acl');           super

then i let cake print out me aktive components:

$aro = new Aro();

but in the same time i get a real ugly sql error:

Query: startup

Warning (512): SQL Error: 1064: You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version ....
blablabla

well if you have any idea what i do wrong, i would be very happy...

tribastian


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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