I'm working through this tutorial:
http://www.scribd.com/doc/5545/CakePHP-tutorial-no-2-from-IBM
I am stuck on some ACL stuff. As far as I can see, this ACL check
should pass, but it doesn't.
echo $this->Session->read('user');
echo '<br>';
echo $id . '-' . $product['Product']['title'];
if($this->Acl->check($this->Session->read('user'), $id . '-' .
$product['Product']['title'], 'read')) {
...
}
else {
...
}
$this->Session->read('user') is '123456'
$id . '-' . $product['Product']['title'] is '3-carebear'
The tables in the database seem to suggest the check should pass:
aro_id 1 (user '123456') has read access on aco_id 3 (product '3-
Carebear').
Any ideas?
mysql> select * from aros_acos \G
*************************** 1. row ***************************
id: 1
aro_id: 1
aco_id: 3
_create: 0
_read: 1
_update: 0
_delete: 0
*************************** 2. row ***************************
id: 2
aro_id: 5
aco_id: 3
_create: 1
_read: 1
_update: 1
_delete: 1
2 rows in set (0.00 sec)
mysql> select * from aros \G
*************************** 1. row ***************************
id: 1
foreign_key: 0
alias: Users
lft: 1
rght: 10
*************************** 2. row ***************************
<snip>
*************************** 5. row ***************************
id: 5
foreign_key: 3
alias: abcdef
lft: 4
rght: 5
5 rows in set (0.00 sec)
mysql> select * from acos \G
*************************** 1. row ***************************
<snip>
*************************** 3. row ***************************
id: 3
object_id: 3
alias: 3-Carebear
lft: 2
rght: 3
3 rows in set (0.00 sec)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---