My apologies for this large, multi-pronged commit. What's here:

* Introduce Tracks::Config class to wrap environment.rb config settings
* Remove unused admin and index actions from user_controller
* Introduce flash partial and standardize on symbol keys for the flash hash
* Replace usages of render_partial with render :partial

Two new authentication options! These probably need documentation...

* Introduce LDAP authentication option (see configuration in environment.rb.tmpl). Thanks to Jeremy Evans for creating the SimpleLdapAuthenticator plugin. Note: the ldap auth integration test is likely to be fragile. Works for me on OS X with openldap, but your mileage may vary.
* Introduce Open ID authentication option (see configuration in environment.rb.tmpl and http://openid.net for more info). Thanks to East Media for the Open ID Consumer Plugin.
 
In environment.rb, you can enable any combination of the three auth options. If you have more than one selected, users can opt between them via their preferences pages. To play with the Open ID auth, you can get an identity at pip.verisignlabs.com.

Note that there are some new migrations to support the new authentication options, so don't forget to rake migrate!


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@334 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lukemelia 2006-11-05 10:41:59 +00:00
parent 4e0b459524
commit 99b734a52c
69 changed files with 1649 additions and 218 deletions

View file

@ -10,7 +10,7 @@ class CreateUserControllerTest < ActionController::IntegrationTest
fixtures :users
@@foobar_postdata = "<request><login>foo</login><password>bar</password></request>"
@@john_postdata = "<request><login>john</login><password>barracuda</password></request>"
@@johnny_postdata = "<request><login>johnny</login><password>barracuda</password></request>"
def setup
assert_test_environment_ok
@ -63,13 +63,13 @@ class CreateUserControllerTest < ActionController::IntegrationTest
def test_creates_new_user
initial_count = User.count
authenticated_post_xml_to_user_create @@john_postdata
authenticated_post_xml_to_user_create @@johnny_postdata
assert_response_and_body 200, "User created."
assert_equal initial_count + 1, User.count
john1 = User.find_by_login('john')
assert_not_nil john1, "expected user john to be created"
john2 = User.authenticate('john','barracuda')
assert_not_nil john2, "expected user john to be created"
johnny1 = User.find_by_login('johnny')
assert_not_nil johnny1, "expected user johnny to be created"
johnny2 = User.authenticate('johnny','barracuda')
assert_not_nil johnny2, "expected user johnny to be created"
end
def test_fails_with_get_verb