In 1.2 there is an AclBehavior, which I use to create Group Access.
It is very simple to use. I am in the process of making a User
Management Plugin for 1.2 which I am very nearly finished.
However the basics of Acl in 1.2 have not changed. To use the
behaviour it is as simple as using var $actsAs = array('Acl') and then
you need a function called parentNode. Here is my entire Group model
which allows me to provide Group based ACL.
class Group extends UsersAppModel {
var $name = 'Group';
var $actsAs = array('Acl');
/**
* Finds the parent of the current Group ARO node. This function is
required
* for AclBehavior
*
* @return mixed null for root, int for other nodes
*/
function parentNode(){
if (!$this->id) {
return null;
}
$data = $this->read();
if (!$data['Group']['parent_id']){
return null;
} else {
return $data['Group']['parent_id'];
}
}
}
You can also do the same for user level access on your user model. As
i said, I will be posting an article on this soon, along with how to
use the Auth component, both of which I rely on in my Users plugin,
which will also be released very soon.
Geoff
--
http://lemoncake.wordpress.com
On Jul 9, 7:35 am, "Gustavo Carreno" <[EMAIL PROTECTED]> wrote:
> On 7/8/07, Chris Hartjes <[EMAIL PROTECTED]> wrote:
>
>
>
> > Acl hasn't really changed in 1.2, so those links still apply.
>
> I beg do differ.
> The Tree Behavior has been introduced in ACL in 1.2 this makes it very
> much different.
>
> I myself tried to use the "Real world access control" article in 1.2
> and it did diddley-squat.
>
> @sTb: Thanks for finding out the right way m8 !!
>
> And BTW I just filed a ticket on track about missing {} on the Tree
> Behavior, let's see if it gets fixed so we don't have problem
> inserting nodes under parents.
>
> I almost went crazy trying to find why a } that was on 2 of the UPDATE
> statements after inserting a child node to a parent...
>
> --
> Gustavo Carreno
> ---
> < If you know Red Hat you know Red Hat,
> If you know Slackware you know Linux >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---