Great, that helps a lot. I still don't understand why when I do cake
acl view aco I get just group.id etc and in most examples online
people get more detailed info. Should I be using an alias instead of a
group model? What's the difference?

Basically, I just want to have 3 types of users and depending upon the
type, there should be different things happening on a specific page.
It's fine to limit the actions using ACL but more importantly (for the
user interface) is to have links to the actions only appear when a
user from the correct group is logged in.

I'm sure a million people have asked this so thanks for your patience
and please direct me to any older posts that may have answered this. I
just don't know what to search for!

Thanks,
Jason

On Apr 23, 3:58 am, cricket <[email protected]> wrote:
> On Apr 22, 7:02 pm, paws_galuten <[email protected]> wrote:
>
>
>
>
>
> > 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?
>
> Auth holds onto just the User data. But you can store some other info
> in the session upon login. See this recent thread:
>
> http://groups.google.com/group/cake-php/browse_thread/thread/9bb8720f...
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 
> athttp://groups.google.com/group/cake-php?hl=en

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

Reply via email to