I'm referring to the tutorial in the Cake manual.
11.2.4.1 Group-only ACL says: "In case we want simplified per-group
only permissions, we need to implement bindNode() in User model."
function bindNode($user) {
return array('model' => 'Group', 'foreign_key' => $user['User']
['group_id']);
}
This method will tell ACL to skip checking User Aro's and to check
only Group Aro's.
Every user has to have assigned group_id for this to work.
In this case our aros table will look like this:
+----+-----------+-------+-------------+-------+------+------+
| id | parent_id | model | foreign_key | alias | lft | rght |
+----+-----------+-------+-------------+-------+------+------+
| 1 | NULL | Group | 1 | NULL | 1 | 2 |
| 2 | NULL | Group | 2 | NULL | 3 | 4 |
| 3 | NULL | Group | 3 | NULL | 5 | 6 |
+----+-----------+-------+-------------+-------+------+------+
3 rows in set (0.00 sec)
My aros table still shows the individual users.. I'm wondering if
anybody knows why.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" 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