Allow user to be logged-inot several password-protected webs simultaneously.

This commit is contained in:
Jacques Distler 2007-02-09 13:19:03 -06:00
parent c358389f25
commit 5536e6e79e

View file

@ -76,7 +76,7 @@ class ApplicationController < ActionController::Base
def password_check(password)
if password == @web.password
cookies['web_address'] = password
cookies[CGI.escape(@web_name)] = password
true
else
false
@ -188,7 +188,7 @@ class ApplicationController < ActionController::Base
def authorized?
@web.nil? or
@web.password.nil? or
cookies['web_address'] == @web.password or
cookies[CGI.escape(@web_name)] == @web.password or
password_check(@params['password'])
end