Commit e571c718b07a43b810239eadce872f903756417d
Exists in
master
and in
29 other branches
Merge branch 'remote_user_loggout_fix' into 'master'
Remote user loggout fix Fix the Remote User Plugin Logout See merge request !364
Showing
2 changed files
with
17 additions
and
1 deletions
Show diff stats
plugins/remote_user/lib/remote_user_plugin.rb
plugins/remote_user/test/functional/remote_user_plugin_test.rb
... | ... | @@ -71,4 +71,20 @@ class AccountControllerTest < ActionController::TestCase |
71 | 71 | assert_equal true, User.last.activated? |
72 | 72 | assert_equal User.last.id, session[:user] |
73 | 73 | end |
74 | + | |
75 | + should 'logout if there is a current logged user but not a remote user' do | |
76 | + user1 = create_user('testuser', :email => 'testuser@example.com', :password => 'test', :password_confirmation => 'test') | |
77 | + user1.activate | |
78 | + | |
79 | + login_as user1.login | |
80 | + | |
81 | + get :index | |
82 | + | |
83 | + assert session[:user].blank? | |
84 | + | |
85 | + @request.env["HTTP_REMOTE_USER"] = "" | |
86 | + get :index | |
87 | + | |
88 | + assert session[:user].blank? | |
89 | + end | |
74 | 90 | end | ... | ... |