hi Petter;
On Tue, July 20, 2010 9:12 am, Petter Andreas Strøm wrote:
> Well, I have to explain the topic for the discussion too;
>
> I'm looking for a solution where I can make a function to check if
> user have this capability like if(userHasCap('user_edit')). How can i
> make a function like this and include it into every view i need it?
> Component?
you could do this in a view helper if you are expecting logic to go into a
view page (.ctp).
ideally the logic should go in the action for the view in which case you
could either use a component or more simply just a function in
app_controller which will make it available to each controller.
--
Mike Karthauser
Managing Director - Brightstorm Ltd
Email: [email protected]
Web: http://www.brightstorm.co.uk
Tel: 07939 252144 (mobile)
Fax: 0870 1320560
Address: 1 Brewery Court, North Street, Bristol, BS3 1JS
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