feat: compatible different uid of LDAP server (#1860)

* feat: compatible different uid of LDAP server

* Update organization.go

---------

Co-authored-by: hsluoyz <hsluoyz@qq.com>
This commit is contained in:
Yaodong Yu
2023-05-19 02:34:25 +08:00
committed by GitHub
parent 6455734807
commit 65dcbd2236
8 changed files with 76 additions and 88 deletions

View File

@ -94,7 +94,7 @@ class LdapSyncPage extends React.Component {
if (res.status === "ok") {
this.setState((prevState) => {
prevState.users = res.data.users;
prevState.existUuids = res.data2?.length > 0 ? res.data2.filter(uuid => uuid !== "") : [];
prevState.existUuids = res.data.existUuids?.length > 0 ? res.data.existUuids.filter(uuid => uuid !== "") : [];
return prevState;
});
} else {
@ -210,7 +210,7 @@ class LdapSyncPage extends React.Component {
});
},
getCheckboxProps: record => ({
disabled: this.state.existUuids.indexOf(record.uuid) !== -1 || record.uidNumber === "",
disabled: this.state.existUuids.indexOf(record.uuid) !== -1,
}),
};