devise roles: different roles, in some cases same rights
Posted
by mattherick
on Stack Overflow
See other posts from Stack Overflow
or by mattherick
Published on 2010-04-24T14:39:46Z
Indexed on
2010/04/24
14:43 UTC
Read the original article
Hit count: 791
I have two roles in devise. The first is the admin and the second the normal user-role. Now I´d like to give these two groups in some cases same rights with before filters.
How does this work?
I have: before_filter :authenticate_user!, :only => [:new, :create] before_filter :authenticate_admin!, :only => [:new, :create, :edit, :update, :destroy]
But now only a user can :new and :create...the admin not.. What I have to do here?
Thanks, Mattherick
© Stack Overflow or respective owner