Hi,

I'm trying to implement some functionality for hiding buttons(and
info) from a page depending on parameters sat for the specific user
(in the model). Off course to create some restrictions for the
different users.

But im kind of confused how to do this. The way i do it now is like:

1. Cache the user capabilities on login (now i have implemented this
in the App_model, which is bad, so i made another post about this)

2. In each function view read the cached user capabilities and iterate
that list and check if that function should be rendered. Code:

foreach(Cache::read('userCapList') as $userCap){
                        if($userCap['tag']=="user_edit"){
                            // echo function
                        }
                    }

I think this solution is bad, and wonder if any of you have a better
solution?

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