fix nccu login

This commit is contained in:
Matthew K. Fu JuYuan 2012-09-25 15:07:07 +08:00
parent 7a523281c3
commit 54b874b2c9
3 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ class SessionsController < Devise::SessionsController
result = false result = false
ldap_filter = "(uid=#{login_uid})" ldap_filter = "(uid=#{login_uid})"
if /@rulingcom.com$/.match(login_uid).nil? if /@rulingcom.com$/.match(login_uid).nil?
# MiddleSiteConnection.establish MiddleSiteConnection.establish
NccuLdapConnection.establish NccuLdapConnection.establish
if ($nccu_ldap_connection.bind rescue false) if ($nccu_ldap_connection.bind rescue false)

View File

@ -15,7 +15,7 @@ module MiddleSiteConnection
} }
def self.establish def self.establish
# $mid_site_connection = Mysql2::Client.new(@mid_host) $mid_site_connection = Mysql2::Client.new(@mid_host)
end end
end end

View File

@ -9,7 +9,7 @@ namespace :mid_site do
admin_role = nil admin_role = nil
sub_role = nil sub_role = nil
test_account_ldap_id ='139716' test_account_ldap_id ='139716'
#MiddleSiteConnection.establish MiddleSiteConnection.establish
task :sync => :environment do task :sync => :environment do
info_profile = Info.first(conditions: {:key => 'profile'}) info_profile = Info.first(conditions: {:key => 'profile'})