Could someone help me with this. It *really* only needs to be this
simple. I don't need user models or plugins etc.
I think it's clear what I'd like (either admin or slt to
authenticate), but it's obviously flawed and lets any username
password combination in!
def authenticateAdmin
authenticate_or_request_with_http_basic do |name, password|
name == "admin" || "slt" && password == "admin" || "slt"
end
end
I've also tried:
def authenticateAdmin
authenticate_or_request_with_http_basic do |name, password|
(name == "admin" && password == "admin") || (name == "slt" &&
password == "slt")
end
end
Thanks.
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---