It is very difficult to understand, but I'm finally getting ACL and
Auth working in my app. I have a User model and a Group model (pretty
much copied from the Cookbook). I have figured out a few things but
there are still things that are not clear. Here's what I know:
In order to allow public access to a specific action I can use $this-
>Auth->allowedActions = array('actionName'); in the beforeFilter.
Then, if I want specific permissions I can set those with an entry in
the aros_acos table which references the aco and aro tables by id.
That works great if I'm just restricting and granting access to entire
actions. But what if I want to check who's logged in and do things a
little differently (display different links, etc.) depending upon what
group they belong to?
Here's where I get a bit confused. First of all, if I do the shell
command "cake acl view aro" I get this:
[1]Group.1
[4]User.1
[5]User.2
[2]Group.2
[3]Group.3
So, I'm not seeing the names of the groups or the names of the users
and it's hard to figure out what's what.
When I do this in the view:
<? debug($session->read('Auth')); ?>
I get this:
Array
(
[User] => Array
(
[id] => 1
[username] => jason
[group_id] => 1
)
)
I don't get any group info... How is this supposed to work?
Thanks,
Jason
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