BUG's Living Diary

Icon

蟲的生活日誌

Integrating Mantis with LDAP

Here is the Mantis.

有三個需要修改的地方:

1. config_inc.php 中加入 LDAP 設定

$g_login_method = LDAP;
$g_ldap_server = 'ldap://ldap.mis.kuas.edu.tw';
$g_ldap_port = '389';
$g_ldap_root_dn = 'ou=People, dc=mis, dc=kuas.edu.tw';
$g_ldap_organization = '';
$g_ldap_uid_field = 'uid';

2. core/ldap_api.php 使 Mantis 能夠支援 LDAP Protocol v3

找到第 22 行: $t_ds = @ldap_connect ( $t_ldap_server, $t_ldap_port );

並於下方加入: @ldap_set_option($t_ds, LDAP_OPT_PROTOCOL_VERSION, 3);

3. core/authentication_api.php 使 Mantis 可以使用 LDAP 以及 Database 帳號

找到第 189 行: return ldap_authenticate( $p_user_id, $p_test_password );

並修改為: if( ldap_authenticate( $p_user_id, $p_test_password ) ) return true;

—-

Mantis 是個不錯的 Issue tracker, 重要它是免費的

But… 中文真的是翻的有點差強人意… 比英文還難懂… faint

Filed under: 蟲的研究心得

Leave a Reply

Author

參觀人數

  • 19,739 人次

Flickr 相簿

DSCN1635

More Photos