Hi everybody, I am working on a new project which would allow people to register as a guest, with the option of also subscribing (paying) to get extra features. I wondered if anyone had done something like this before? I kindof understand the authentication part, but I am unsure how to tie-in the option of subscribing and in effect ''unlocking'' extra features - for example, allowing the user to store more private messages etc. If you know of some tutorials or if you can offer any tips, then that would be great. Thanks, Neil. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Hi Neil, Check out the role-based authentication plugin. Or you can put something together yourself pretty easy. Just create a model called Role, add a has_one to your user model. The Role model (heh) will hold info about permissions. Cheers Starr --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Neil Bradley wrote:> Hi everybody, > > I am working on a new project which would allow people to register as a > guest, with the option of also subscribing (paying) to get extra > features. I wondered if anyone had done something like this before? >I have used the ActiveRBAC engine (role based access controll) to do this with my site. My Account model has methods such as upgrade! and downgrade! (for cancels or billing failures) which add or delete Roles from the User as appropriate. On the whole, ActiveRBAC is good and I have even posted a handy method for protecting your controllers and actions without a lot of code polluting your controllers. Search the arbac email list for it. I found that the login functionality needs considerable modification for a commerical site though. Usability is key. Steven -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Hey Steven, Thanks for the heads up for ActiveRBAC. This looks exactly like the type of thing I have been looking for with subscriber roles. I will definitely have a search for your method for protecting the controllers. Neil. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---