Tuesday, February 22, 2011

hiding link from certain users.

Hello again.

My web application has several group of users.
1. user
2. superuser

I've created a page where only superuser can access and was
successful. But my problem is the link in default.ctp that direct
users to that page are still visible to normal user after login. I
just want the link to be visible for superuser.. I was thinking of
something similar to this..

after login:
if ($user = 'superuser') {

echo $html->link (__('System Setting',true), array
('controller'=>'committees','action'=>'setpages'))

}

but I'm not sure how to apply it to cakephp framework.. i need help
and guide, i'm a newbie... thank you!

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: