hi, I am using rails 3.0.10, i had created user and admin using devise, i want to make normal user as admin, can anyone help me on how to make user as admin Thanks Kapil -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
The easiest way is probably to just have a boolean "is_admin" field on the user model. Really depends on your other requirements though. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/syWL3ZFb3LYJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Jan 9, 2012, at 5:09 AM, Kapil Kaligotla wrote:> hi, > I am using rails 3.0.10, i had created user and admin using devise, > i want to make normal user as admin, can anyone help me on how to make > user as admin >Have you created two different models, one for admin and one for user? Or are you using an authorization scheme where you give individual users (all the same model) different roles? Walter> Thanks > Kapil > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
It''s there on the wiki https://github.com/plataformatec/devise/wiki/How-To:-Add-an-Admin-role Ahmy Yulrizka On Tue, Jan 10, 2012 at 9:29 PM, Walter Lee Davis <waltd-HQgmohHLjDZWk0Htik3J/w@public.gmane.org>wrote:> > On Jan 9, 2012, at 5:09 AM, Kapil Kaligotla wrote: > > > hi, > > I am using rails 3.0.10, i had created user and admin using devise, > > i want to make normal user as admin, can anyone help me on how to make > > user as admin > > > > Have you created two different models, one for admin and one for user? Or > are you using an authorization scheme where you give individual users (all > the same model) different roles? > > Walter > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I am using different models for user and admin On Jan 10, 7:29 pm, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:> On Jan 9, 2012, at 5:09 AM, Kapil Kaligotla wrote: > > > hi, > > I am using rails 3.0.10, i had created user and admin using devise, > > i want to make normal user as admin, can anyone help me on how to make > > user as admin > > Have you created two different models, one for admin and one for user? Or are you using an authorization scheme where you give individual users (all the same model) different roles? > > Walter > > > > > > > > > Thanks > > Kapil > > > -- > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
ya, I used the same link for for creating admin role, but now i want to make user to act as another admin On Jan 11, 4:23 am, Ahmy Yulrizka <ahmy...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> It''s there on the wikihttps://github.com/plataformatec/devise/wiki/How-To:-Add-an-Admin-role > > Ahmy Yulrizka > > On Tue, Jan 10, 2012 at 9:29 PM, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org>wrote: > > > > > > > > > > > On Jan 9, 2012, at 5:09 AM, Kapil Kaligotla wrote: > > > > hi, > > > I am using rails 3.0.10, i had created user and admin using devise, > > > i want to make normal user as admin, can anyone help me on how to make > > > user as admin > > > Have you created two different models, one for admin and one for user? Or > > are you using an authorization scheme where you give individual users (all > > the same model) different roles? > > > Walter-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I followed to create admin and users roles in the following links https://github.com/plataformatec/devise/wiki/How-To:-Add-an-Admin-role https://github.com/plataformatec/devise I used different models for admin and user But now i want to make the some users to act as admin, please tell me the process of making a user as admin On Jan 10, 7:24 pm, Tim Shaffer <timshaf...-BUHhN+a2lJ4@public.gmane.org> wrote:> The easiest way is probably to just have a boolean "is_admin" field on the > user model. > > Really depends on your other requirements though.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
The great way to use Devise , for me, it''s t couple it with the Gem CANCAN to manage capabilities. Then you just have to make a migration to add different ''role'' to the user(with devise) like ''ADMIN'', ''COMMON'',or ''VISITOR''. Checkout the Readme.md of the gem Cancan on these suitable links: video tuts of Ryanb Baytes : http://railscasts.com/episodes/192-authorization-with-cancan The gem on Github: https://github.com/ryanb/cancan I hope this will help you. Good luck ;) 2012/1/11 Kapil Kaligotla <kapil.kaligotla-C8lSLueJBA4oM3ANB2zruQ@public.gmane.org>> I am using different models for user and admin > > > On Jan 10, 7:29 pm, Walter Lee Davis <wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote: > > On Jan 9, 2012, at 5:09 AM, Kapil Kaligotla wrote: > > > > > hi, > > > I am using rails 3.0.10, i had created user and admin using devise, > > > i want to make normal user as admin, can anyone help me on how to make > > > user as admin > > > > Have you created two different models, one for admin and one for user? > Or are you using an authorization scheme where you give individual users > (all the same model) different roles? > > > > Walter > > > > > > > > > > > > > > > > > Thanks > > > Kapil > > > > > -- > > > You received this message because you are subscribed to the Google > Groups "Ruby on Rails: Talk" group. > > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm > . > > > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > For more options, visit this group athttp:// > groups.google.com/group/rubyonrails-talk?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- *lionel Bastian LONKAP TSAMBA* Étudiant 4e année Génie Informatique et Statistiques à Polytech-lille Site: http://first-developer.fr Email: lionel.firstdeveloper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Tel: +336 12 48 03 01 -- *lionel Bastian LONKAP TSAMBA* Fourth year student in Software Engineering and Statistics at the Lille University Graduate School of Engineers (Polytech-Lille) Site: http://first-developer.fr Email: lionel.firstdeveloper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Phone: +336 12 48 03 01 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.