Hi, I have applied Acl and Auth as instructed in the example tutorial of the book. The first user I created is a member of user_group => 1 which has access to all controllers using:
$group->id = 1; $this->Acl->allow($group, 'controllers'); But when I login and try to access anything I keep getting the "You are not authorized to access that location." error message. Looking at the queries ran I can see that when fetching the associated AROs it is only fetching the users ARO id (3) instead of the user's id (3) and user's group id (1). SELECT `Aro`.`id`, `Aro`.`parent_id`, `Aro`.`model`, `Aro`.`foreign_key`, `Aro`.`alias` FROM `aros` AS `Aro` LEFT JOIN `aros` AS `Aro0` ON (`Aro`.`lft` <= `Aro0`.`lft` AND `Aro`.`rght` >= `Aro0`.`rght`) WHERE `Aro0`.`model` = 'User' AND `Aro0`.`foreign_key` = 1 ORDER BY `Aro`.`lft` DESC As such when it carries out the full permissions check it fails as I have allowed access at controller level for the group so there are no permissions for the user. SELECT `Permission`.`id`, `Permission`.`aro_id`, `Permission`.`aco_id`, `Permission`.`_create`, `Permission`.`_read`, `Permission`.`_update`, `Permission`.`_delete`, `Aro`.`id`, `Aro`.`parent_id`, `Aro`.`model`, `Aro`.`foreign_key`, `Aro`.`alias`, `Aro`.`lft`, `Aro`.`rght`, `Aco`.`id`, `Aco`.`parent_id`, `Aco`.`model`, `Aco`.`foreign_key`, `Aco`.`alias`, `Aco`.`lft`, `Aco`.`rght` FROM `aros_acos` AS `Permission` LEFT JOIN `aros` AS `Aro` ON (`Permission`.`aro_id` = `Aro`.`id`) LEFT JOIN `acos` AS `Aco` ON (`Permission`.`aco_id` = `Aco`.`id`) WHERE `Permission`.`aro_id` = 3 AND `Permission`.`aco_id` IN (23, 22, 1) ORDER BY `Aco`.`lft` desc Anyone got any ideas? P.S. I self-resolved the issue I posted last night, tried to add a reply to say that was closed, but my reply has not appeared for some reason, said it was posted but ain't shown up. --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---