Remove unless config file
This commit is contained in:
parent
551e1ef740
commit
848d935d23
|
@ -0,0 +1,25 @@
|
||||||
|
#encoding: utf-8
|
||||||
|
require 'mysql2'
|
||||||
|
|
||||||
|
$nccu_ldap_connection
|
||||||
|
|
||||||
|
module NccuLdapConnection
|
||||||
|
BASE = 'ou=People,dc=nccu,dc=edu,dc=tw'
|
||||||
|
|
||||||
|
@ldap_host = {
|
||||||
|
:host => '127.0.0.1', #140.119.166.23 or 127.0.0.1
|
||||||
|
:port => 8001, #389 or 8001
|
||||||
|
# :filter => "(uid=#{login_uid})",
|
||||||
|
# :base => "ou=People,dc=nccu,dc=edu,dc=tw",
|
||||||
|
:authenticate_info => "cn=uccn,ou=profile,dc=nccu,dc=edu,dc=tw",
|
||||||
|
:authenticate_pwd => "nccu2ucc"
|
||||||
|
}
|
||||||
|
|
||||||
|
def self.establish
|
||||||
|
$nccu_ldap_connection = Net::LDAP.new
|
||||||
|
$nccu_ldap_connection.port = @ldap_host[:port]
|
||||||
|
$nccu_ldap_connection.host = @ldap_host[:host]
|
||||||
|
$nccu_ldap_connection.authenticate(@ldap_host[:authenticate_info],@ldap_host[:authenticate_pwd])
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
|
@ -1,9 +0,0 @@
|
||||||
nccu_mid_site:
|
|
||||||
adapter: mysql2
|
|
||||||
encoding: utf8
|
|
||||||
reconnect: true
|
|
||||||
database: RSS23_NCCU_MIDDLE
|
|
||||||
pool: 5
|
|
||||||
username: rulingcom
|
|
||||||
password: 5w3iJQ9OJQMGhJibKP6YQje8
|
|
||||||
socket: /tmp/mysql.sock
|
|
Reference in New Issue