On Fri, Oct 26, 2012 at 6:41 PM, Harisankar P S <[email protected]> wrote:

>
> How do you specify in your application if he is admin or not. I do not use
> cancan so not sure how if some function is available in cancan. But how I
> would suggest is to use *before_filer* and check if admin or not.
>
> Find a small code snipet https://gist.github.com/3958710
>
> *assuming that user_level is stored in the user table
>
> --
> Harisankar P S
>
>

No in rolify and CanCan, basically i check for this by using
"user.has_role? :superadmin".. And it's working fine except that it doesn't
redirect to superadmin page directly after login but admin page and from
there i am able to go to superadmin page. But it shouldn't go the admin
page at all.
-- 
Regards
RAKESH KUMAR
http://raakeshkumar.wordpress.com
_______________________________________________
Ilugd mailing list
[email protected]
http://frodo.hserus.net/mailman/listinfo/ilugd

Reply via email to