Controller design for app with different user types

Hi,

I am trying to implement an application where there are different types of users (about 5-6). The privileges of each type of user varies pretty drastically and hence when each logs into the application, each will have his own home page and set of things that he can do that differs from other types of users.

Since the views would also change (or rather look totally different) for each of them, I thought it would be better to have totally different controllers and actions based on the type of users. I have been reading about how to design this kind of an scenario but have not been able to stumble upon a sound design as of now. There was one reference to namespaced controllers... do you think this would be the best approach for the situation in hand. If you know of any tutorial, that would be useful.

Plus, I see that a lot of my actions don't fall just within the CRUD actions, I need more... can some lead me to design tips or tutorials for such a thing too? Any help is appreciated. Thanks in advance!

-J

Roles are fairly well-documented in the blogosphere, even if the roles are entirely orthogonal. Here are a few readings to get you started:

http://metautonomo.us/2008/09/30/easy-role-based-authorization/ http://railsforum.com/viewtopic.php?id=1579 http://www.vaporbase.com/postings/Authorization_in_Rails

Are the views actually that different? It may be just that the content of the profiles is determined by the user's role(s), but the template can remain the same for all roles.