#55 ✓resolved
Gábor Vészi

creating an other user resets my session

Reported by Gábor Vészi | March 15th, 2009 @ 02:45 PM

I'm logged in as an admin user who is able to create other users. The problem is, my user_credentials are updated in the my cookies when I create this new user.

Here's the test that fails. Put it in orm_adapters_tests/active_record_adapter_tests/acts_as_authentic_tests/session_maintenance.rb

def test_creating_other_user
  ben = users(:ben)
  old_session_key = @controller.session["user_credentials"]
  old_cookie_key = @controller.cookies["user_credentials"]
  User.create(:login => "awesome", :password => "saweet", :password_confirmation => "saweet", :email 
  assert_equal @controller.session["user_credentials"], old_session_key
  assert_equal @controller.cookies["user_credentials"], old_cookie_key

Comments and changes to this ticket

  • Ben Johnson

    Ben Johnson March 15th, 2009 @ 06:18 PM

    • State changed from “new” to “resolved”

    Good find, that resulted from some refactoring. Anyways, I updated my tests and fixed the problem. Just update from the repo. Thanks!

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Object based authentication solution that handles all of the non sense for you. It's as easy as ActiveRecord is with a database.

People watching this ticket