[Bugfix] LDAP同步用户列表中如果API获取到的用户名中有空格,在设置为id的时候默认会取第一个空格前的字符串作为用户名,导致不会导入用户 (#2726)

pull/2728/head
BaiJiangJie 2019-05-23 18:52:19 +08:00 committed by 老广
parent 4cd3dd3670
commit 2df1dd2bb1
1 changed files with 3 additions and 0 deletions

View File

@ -58,6 +58,9 @@ function initLdapUsersTable() {
ele: $('#ldap_list_users_table'), ele: $('#ldap_list_users_table'),
ajax_url: '{% url "api-settings:ldap-user-list" %}', ajax_url: '{% url "api-settings:ldap-user-list" %}',
columnDefs: [ columnDefs: [
{targets: 0, createdCell: function (td, cellData, rowData) {
$(td).html("<input type='checkbox' class='text-center ipt_check' id='ID_USERNAME'>".replace("ID_USERNAME", cellData))
}},
{targets: 4, createdCell: function (td, cellData, rowData) { {targets: 4, createdCell: function (td, cellData, rowData) {
if(cellData){ if(cellData){
$(td).html('<i class="fa fa-check text-navy"></i>') $(td).html('<i class="fa fa-check text-navy"></i>')