Topic: Handling Many roles

I have many roles ( like head of department, instructor, student etc) and I want some page accessed only by the authorized body and not by the others. Can any one suggest me a way to do that please. I will prefer to do it without a plug in.

thanks in advance

Re: Handling Many roles

Even you said no plugin i would want to suggest https://github.com/ryanb/cancan for that.

I use it in my applications.  Its really simple and comes with a very good documentation.

Re: Handling Many roles

Hi everybody. I have seen and tried cancan. it is very nice I liked it.
I need some clarification on defining abilities.
when we say
:read, :some resource => we are  saying the user can only read that specific resource and can't perform any action on that resource and even can't read any other resource. am I right?
but it is not restricting the user from performing other actions and even accessing other resources. in my case I have to restrict every user from accessing every resource using cannot. but this is tiresome in big project.
can u suggest me please how to do this.