Authentication and Authorization

Hi!

   I have a question about authentication and authorization. I would like to authenticate users through apache, and pass their username across into rails. In rails, I have a table in my database called 'people', a table called 'groups', and a table called 'results'. I would like rails to look up the group_id in the people table, and filter rows in the 'results' table based on the group_id. I also have a 'group_id' in the results table.

   So, for example, if my login name was 'bob' and my group was 'hr' with a group id of '1', it would have 'bob' and '1' in the people table, '1' 'hr' in the group table, and '1' in the results table. Then, when bob logs in, he would see just 'hr' information from the results table.

   I was hoping somebody could recommend something or a 'howto' to do this. I stumbled upon some authentication programs, but it seems like they are either too advanced or either allow or deny somebody.

Thanks in advanced....

Check out Coda Hale's Simple HTTP Auth plugin. You should be able to accomplish what you want with it.

http://blog.codahale.com/2006/05/11/basic-http-authentication-with-rails-simple_http_auth/