How can I route users to different functions based on their privileges in CakePHP?

This may have been asked before, and I have seen similar solutions... Perhaps I am thinking about this incorrectly.

I would like to have one link called user/edit if the user is an admin it should route to admin_ if they are a basic user it should route to user_ etc... Is there a way to do this in a slick way?

I have seen solutions that kind of do the opposite like type in user/admin_edit and it takes you to user/edit...


You will want to take a look at prefix routing.

Combine this with Cakes built in Auth/ACL and you should have no problem.

Need Your Help

Wait until end of thread execution before executing the next method

java multithreading

I've a JFrame subclass that manage my UI and call a method of Item Object to import items in my DB:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.