Fix login and label. Check sync jobs and update info function.

This commit is contained in:
Matthew K. Fu JuYuan committed 2012-05-24 17:01:00 +08:00
1 parent c062b43069
commit 3480fa2545
8 files changed
+61 -38

No files matched your search

+2 -2
View File
@@ -15,10 +15,10 @@ class SessionsController < Devise::SessionsController
if $nccu_ldap_connection.bind
logger.info "=LDAP Binded password ok..."
result =check_auth_with_ldap(login_uid,login_password)
if result && login_password!=''
if result #&& login_password!=''
logger.info "==LDAP password passed..."
nccu_id = get_nccu_id_from_mid_site(login_uid)
resource = nccu_id.nil? ? nil : (User.first(conditions:{ nccu_id: nccu_id }))
resource = nccu_id.nil? ? nil : (User.first(conditions:{ nccu_ldap_uid: nccu_id }))
# resource = env['warden'].authenticate!(:check_nccu_ldap)
# resource = warden.authenticate!(:scope => resource_name, :recall => "#{controller_path}#new")
set_flash_message(:notice, :signed_in) if is_navigational_format?