mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-27 01:24:07 +01:00
properly insert CAS as another auth method
This commit is contained in:
parent
31b173ae5b
commit
1621a7bb7d
3 changed files with 31 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue