Browse files

Fixes bug preventing api and rss keys work when cas activated

  • Loading branch information...
1 parent 37a742e commit 9b45e09cb8b9849950cf3c4827ae13a60b780bbe @csierra csierra committed Dec 30, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/cas/application_controller_patch.rb
View
3 lib/cas/application_controller_patch.rb
@@ -37,7 +37,8 @@ def set_user_id
@user.login = session[:cas_user]
session[:auth_source_registration] = { :login => @user.login }
render :template => 'account/register_with_cas'
- elsif session[:user_id] != user.id
+ elsif session[:user_id] != user.id and !['atom', 'xml', 'json'].include? request.format
+
session[:user_id] = user.id
call_hook(:controller_account_success_authentication_after, { :user => user })
end

0 comments on commit 9b45e09

Please sign in to comment.