properly insert CAS as another auth method

This commit is contained in:
Erik Ordway 2009-11-22 14:39:39 -08:00 committed by Eric Allen
parent 31b173ae5b
commit 1621a7bb7d
3 changed files with 31 additions and 4 deletions

View file

@ -6,11 +6,15 @@ class LoginController < ApplicationController
skip_before_filter :login_required
before_filter :login_optional
before_filter :get_current_user
def login
if cas_enabled?
@username = session[:cas_user]
@login_url = CASClient::Frameworks::Rails::Filter.login_url(self)
end
if openid_enabled? && using_open_id?
login_openid
elsif cas_enabled?
elsif cas_enabled? && session[:cas_user]
login_cas
else
@page_title = "TRACKS::Login"
@ -136,7 +140,7 @@ class LoginController < ApplicationController
end
redirect_back_or_home
else
notify :warning, "Sorry, no user by that identity URL exists (#{identity_url})"
notify :warning, "Sorry, no user by that CAS username exists (#{session[:cas_user]})"
end
else
notify :warning, result.message