Shared users

Hi,

I have three RoR apps with the same users. It would be nice if they
didn’t
have to create usernames and passwords for each…

What’s the best practice?

  1. Create one users table, replicate it to the other apps
  2. Create one users table, figure out how to get ActiveRecord to do
    cross-database joins
  3. Use LDAP ;^)

Thanks,

m

I have three RoR apps with the same users. It would be nice if they didn’t
have to create usernames and passwords for each…

What’s the best practice?

  1. Create one users table, replicate it to the other apps
  2. Create one users table, figure out how to get ActiveRecord to do
    cross-database joins
  3. Use LDAP ;^)
  1. Have a backend “auth” table that each of the front ends talk to.
    Only
    keep the bare minimum in that table and put all the app specific profile
    stuff in it’s own database.

Also, depending on how you’re using things you might not need to do
anything. We’ve got a section of our site split out into another
database. Only connection is that the the models for that section
“:have_one :user”.

It all just works as the queries tend to be: select * from my_models
where
user_id = 123.

But I do have to remember i can’t do joins…

-philip

Marc B. wrote:

  1. Use LDAP ;^)
    Why would you have to do a join in #2? I would create a separate
    database with just the users table.


Michael W.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs