lance.sanchez-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jul-12 02:03 UTC
Unsure how to Model this problem
I''m working on a management interface for a Single Login authentication system. We have server web apps, each app can have different installs (same code base different database connection), and available user rights are identical on all instances of a particular web app. They would also like basic support for rolls, with default right sets that can be applied to users. What I have been trying for the last day is to make this work Software Has Many rights and instances Rights Belongs to software Instances Belongs to software I''m pulling my hair out trying to figure out how to tie a user into that relationship so that a user on a specific instance has a set of rights that are not shared across all instances. The other applications are not rails based; most are classic asp, in many ways this is part of a push to try to update some older nightmarish software as well. Any advice or suggestions are appreciated. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
lance.sanchez-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jul-19 16:03 UTC
Re: Unsure how to Model this problem
Ok, I guess my question is a little to broad, our DB designer ended up giving us a database that we have to use. I''m running into a problem where I''m not sure how to make the model connections I have the following tables/models Users Instances Rights Instances_Users Instances_Rights_Users I would like to be able to find out what rights a user has on a given instance. Can you do has_many :instances_rights has_many :instances_rights_users, :through => :instances_rights has_many :rights, :through => instance_rights_users or for this three way relationship am I better off finding by SQL? --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Take a look at this plugin : http://agilewebdevelopment.com/plugins/nested_has_many_through There are some examples I love it :-) -- 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?hl=en -~----------~----~----~----~------~----~------~--~---
lance.sanchez-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jul-19 16:56 UTC
Re: Unsure how to Model this problem
Thank You! You are my Hero! On Jul 19, 9:34 am, Stijn Pint <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Take a look at this plugin :http://agilewebdevelopment.com/plugins/nested_has_many_through > There are some examples > > I love it :-) > > -- > Posted viahttp://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?hl=en -~----------~----~----~----~------~----~------~--~---
A much better solution would be to use a single sign on model where authentication is done in one place and authorization stays with the application. http://www.ja-sig.org/products/cas/ The protocol is actually quite simple. I implemented a cas server and client in a day. Chris --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---