Finding out the remote users username ENV[REMOTE_USER]?

I’m trying to set the modified_by in my user table from the remote user
name. I have htaccess set up for the rails directory but I can’t seem
to get it to read the remote users name. is ENV[REMOTE_USER] the
correct syntax? I searched but I can’t seem to find a definitive
answer. Thank you for any help!

Charlie B.
http://www.recentrambles.com

thanks, I finally figured out the fcgi had to be configured to pass in
the environment variables. It is turned off by default.

Charlie

Charlie

class ApplicationController < ActionController::Base

def authorize
unless request.env[‘REMOTE_USER’] == ‘cjs2’ then
flash[:notice] = ‘You are not authorized to access this part of
the database’
redirect_to(:controller => ‘hubfiles’, :action => ‘list’)
end
end

However this relies on an apache plugin and a University wide
authentication service.

Chris

Charlie B. wrote:

I’m trying to set the modified_by in my user table from the remote user
name. I have htaccess set up for the rails directory but I can’t seem
to get it to read the remote users name. is ENV[REMOTE_USER] the
correct syntax? I searched but I can’t seem to find a definitive
answer. Thank you for any help!

Charlie B.
http://www.recentrambles.com