Re: is anyone using Acl and AuthComponent in 1.2

2007-05-23 Thread alan

I am just looking into it for the first time... it would be great to
get a solid tutorial on it on the cakephp site...  Perhaps they'll get
to that when 1.2 goes stable.

thanks,
-alan-

On May 10, 12:25 pm, Tribastian [EMAIL PROTECTED] wrote:
 On 26 Apr., 07:09, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:



  I was just wondering if anyone is successfully using cakephpAcland
  the newAuthComponentin 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
-~--~~~~--~~--~--~---



Re: is anyone using Acl and AuthComponent in 1.2

2007-05-23 Thread [EMAIL PROTECTED]

Hey guys, near as I can tell... ACL is not yet functional in 1.2,
unless it was finished in the last release (1.2.0.5137alpha)

cook


On May 23, 10:09 am, alan [EMAIL PROTECTED] wrote:
 I am just looking into it for the first time... it would be great to
 get a solid tutorial on it on the cakephp site...  Perhaps they'll get
 to that when 1.2 goes stable.

 thanks,
 -alan-

 On May 10, 12:25 pm, Tribastian [EMAIL PROTECTED] wrote:

  On 26 Apr., 07:09, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

   I was just wondering if anyone is successfully using cakephpAcland
   the newAuthComponentin 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
-~--~~~~--~~--~--~---



Re: is anyone using Acl and AuthComponent in 1.2

2007-05-10 Thread Tribastian



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



Re: is anyone using Acl and AuthComponent in 1.2

2007-04-26 Thread [EMAIL PROTECTED]

One more note to add: The end result for this site is to simply
restrict anything under the admin route, to a group of admins.
Everything else is web accessible. I realize that acl is serious
overkill for such a simple task, I'm using it here to learn more about
acl in 1.2 before using it in larger projects.

cook


On Apr 26, 1:09 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 I was just wondering if anyone is successfully using cakephp Acl and
 the new AuthComponent in 1.2?

 If so, could you give us mortals some guidance in setting it up? It
 looks as though Acl has changed significantly from 1.1.

 Here is some of what I have managed to peace together so far...

 //add the ACL component
 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 the Auth Component, then every
 single action is automatically checked. But if the user is not logged
 in, the acl check 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


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



is anyone using Acl and AuthComponent in 1.2

2007-04-25 Thread [EMAIL PROTECTED]

I was just wondering if anyone is successfully using cakephp Acl and
the new AuthComponent in 1.2?

If so, could you give us mortals some guidance in setting it up? It
looks as though Acl has changed significantly from 1.1.

Here is some of what I have managed to peace together so far...

//add the ACL component
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 access www.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 the Auth Component, then every
single action is automatically checked. But if the user is not logged
in, the acl check 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


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