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
ldap_filter = "(uid=#{login_uid})"
if /@rulingcom.com$/.match(login_uid).nil?
# MiddleSiteConnection.establish
MiddleSiteConnection.establish
NccuLdapConnection.establish
if ($nccu_ldap_connection.bind rescue false)

View File

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

View File

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