nobosh
2010-Aug-29 19:37 UTC
Newbie Qs - Authentication Plugin that supports Instances? Also, Rails 2.3 or 3 for Beginners?
Hello, this is my first week with Rails. I''m working to create an app that has Users associated to instances by their email address. For example, like Yammer, those with the email domain "yahoo.com" only see what others with the same domain see... Also like Basecamp where you only see your stuff but it all lives in the DB. Is there an authentication plug-in that supports that? ie 1. Registration that is email based (no usernames) 2. Users are assigned to an instance based on their email domain, and only see data that is associated to their instance. Lastly, as I''m new should I start with Rails 3 or stick with Rails 2.3? From what I can tell Pro of Rails 3: I can learn fresh from the start Con of Rails 3: Plugins are all for Rails 2+ Thanks for any thoughts or pointers on the above. B -- 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.
Peter De Berdt
2010-Aug-29 21:24 UTC
Re: Newbie Qs - Authentication Plugin that supports Instances? Also, Rails 2.3 or 3 for Beginners?
On 29 Aug 2010, at 21:37, nobosh wrote:> Is there an authentication plug-in that supports that? ie > 1. Registration that is email based (no usernames)If it isn''t the default, it''s certainly an option in the most popular authentication plugins out there: AuthLogic and Devise. Which one to choose depends on how you feel sessions should be managed and what API you prefer. Personally, I think the Rack environment is a good place to maintain sessions, especially if you might use other Rack-based apps that need to tie into an authenticated session. That''s why I use Devise. Authlogic feels that a session is in fact a model, much similar to other models in Rails. It''s certainly a very nice gem, with lots of features and very reliable.> 2. Users are assigned to an instance based on their email domain, and > only see data that is associated to their instance.That''s your job, you just make the necessary model relationships to handle it.> Lastly, as I''m new should I start with Rails 3 or stick with Rails > 2.3? From what I can tell > Pro of Rails 3: I can learn fresh from the start > Con of Rails 3: Plugins are all for Rails 2+Don''t let plugins hold you back, most of the ones you''ll need either have a rails 3 compatible version available or at least a branch on github that supports Rails 3. That includes the two authentication gems I talked about a bit earlier. Quite a lot of syntax and features in Rails 3 are quite different from Rails 2 though, so you''ll be limited to some specific blog posts and the RoR docs themselves. Best regards Peter De Berdt -- 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.
nobosh
2010-Aug-29 22:16 UTC
Re: Newbie Qs - Authentication Plugin that supports Instances? Also, Rails 2.3 or 3 for Beginners?
@Peter, thanks for the reply, very helpful. #1 - I''m going to go with Devise, I found a railscasts video that should make installing it easy #2 - I''ll go with Rails 3, might as well learn the new stuff #3 - Regarding "That''s your job, you just make the necessary model relationships to handle it." That makes sense, thanks for pointing that out. If you can give any tips to point me in the right direction. Example, where would a Rails developer add the logic to extract the email domain, create a table to store all the domains along with IDs, and then check against that whenever a new registration takes place. Also, in terms of making sure users of Domain A only see Domain A content, I''m guessing all my models will need to have the instanceID added? thxs B On Aug 29, 2:24 pm, Peter De Berdt <peter.de.be...-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org> wrote:> On 29 Aug 2010, at 21:37, nobosh wrote: > > > Is there an authentication plug-in that supports that? ie > > 1. Registration that is email based (no usernames) > > If it isn''t the default, it''s certainly an option in the most popular > authentication plugins out there: AuthLogic and Devise. Which one to > choose depends on how you feel sessions should be managed and what API > you prefer. > > Personally, I think the Rack environment is a good place to maintain > sessions, especially if you might use other Rack-based apps that need > to tie into an authenticated session. That''s why I use Devise. > > Authlogic feels that a session is in fact a model, much similar to > other models in Rails. It''s certainly a very nice gem, with lots of > features and very reliable. > > > 2. Users are assigned to an instance based on their email domain, and > > only see data that is associated to their instance. > > That''s your job, you just make the necessary model relationships to > handle it. > > > Lastly, as I''m new should I start with Rails 3 or stick with Rails > > 2.3? From what I can tell > > Pro of Rails 3: I can learn fresh from the start > > Con of Rails 3: Plugins are all for Rails 2+ > > Don''t let plugins hold you back, most of the ones you''ll need either > have a rails 3 compatible version available or at least a branch on > github that supports Rails 3. That includes the two authentication > gems I talked about a bit earlier. > > Quite a lot of syntax and features in Rails 3 are quite different from > Rails 2 though, so you''ll be limited to some specific blog posts and > the RoR docs themselves. > > Best regards > > Peter De Berdt-- 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.
Parker Selbert
2010-Aug-29 23:37 UTC
Re: Newbie Qs - Authentication Plugin that supports Instances? Also, Rails 2.3 or 3 for Beginners?
nobosh wrote:> @Peter, thanks for the reply, very helpful. > > #1 - I''m going to go with Devise, I found a railscasts video that > should make installing it easyDevise is great. Clearance works well also, though it has fewer options. Clearance is email based by default, you would have to add user name support on your own if you wanted.> Also, in terms of making sure users of Domain A only see Domain A > content, I''m guessing all my models will need to have the instanceID > added? thxs > > BYou''re making it more complicated than it really is. class Domain has_many :users end class User belongs_to :domain end Then just check against the current user''s domain. -- 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-/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.