LDAP: fix settings mapping
This commit is contained in:
parent
7868666562
commit
7bae6a4b95
@ -329,34 +329,34 @@ class LdapFormStore {
|
||||
console.log("saving settings");
|
||||
|
||||
const settings = {
|
||||
enableLdapAuthentication: this.isLdapEnabled,
|
||||
startTls: this.isTlsEnabled,
|
||||
ssl: this.isSslEnabled,
|
||||
sendWelcomeEmail: this.isSendWelcomeEmail,
|
||||
server: this.requiredSettings.server,
|
||||
userDN: this.requiredSettings.userDN,
|
||||
portNumber: this.requiredSettings.portNumber,
|
||||
userFilter: this.requiredSettings.userFilter,
|
||||
loginAttribute: this.requiredSettings.loginAttribute,
|
||||
ldapMapping: {
|
||||
EnableLdapAuthentication: this.isLdapEnabled,
|
||||
AcceptCertificate: this.acceptCertificate,
|
||||
StartTls: this.isTlsEnabled,
|
||||
Ssl: this.isSslEnabled,
|
||||
SendWelcomeEmail: this.isSendWelcomeEmail,
|
||||
Server: this.requiredSettings.server,
|
||||
UserDN: this.requiredSettings.userDN,
|
||||
PortNumber: this.requiredSettings.portNumber,
|
||||
UserFilter: this.requiredSettings.userFilter,
|
||||
LoginAttribute: this.requiredSettings.loginAttribute,
|
||||
LdapMapping: {
|
||||
firstNameAttribute: this.requiredSettings.firstName,
|
||||
secondNameAttribute: this.requiredSettings.secondName,
|
||||
mailAttribute: this.requiredSettings.mail,
|
||||
avatarAttribute: this.requiredSettings.avatarAttribute,
|
||||
userQuotaLimit: this.requiredSettings.userQuotaLimit,
|
||||
},
|
||||
accessRights: {},
|
||||
groupMembership: this.groupMembership,
|
||||
groupDN: this.groupDN,
|
||||
userAttribute: this.userAttribute,
|
||||
groupFilter: this.groupFilter,
|
||||
groupAttribute: this.groupAttribute,
|
||||
groupNameAttribute: this.groupNameAttribute,
|
||||
authentication: this.authentication,
|
||||
login: this.login,
|
||||
password: this.password,
|
||||
acceptCertificate: this.acceptCertificate,
|
||||
usersType: this.requiredSettings.userType,
|
||||
UsersType: this.requiredSettings.userType,
|
||||
AccessRights: {},
|
||||
GroupMembership: this.groupMembership,
|
||||
GroupDN: this.groupDN,
|
||||
UserAttribute: this.userAttribute,
|
||||
GroupFilter: this.groupFilter,
|
||||
GroupAttribute: this.groupAttribute,
|
||||
GroupNameAttribute: this.groupNameAttribute,
|
||||
Authentication: this.authentication,
|
||||
Login: this.login,
|
||||
Password: this.password,
|
||||
};
|
||||
|
||||
console.log({ settings });
|
||||
|
@ -1132,57 +1132,7 @@ export function getLdapSettings() {
|
||||
return request(options);
|
||||
}
|
||||
|
||||
export function saveLdapSettings(ldapFormData) {
|
||||
const {
|
||||
enableLdapAuthentication,
|
||||
startTls,
|
||||
ssl,
|
||||
sendWelcomeEmail,
|
||||
server,
|
||||
userDN,
|
||||
portNumber,
|
||||
userFilter,
|
||||
loginAttribute,
|
||||
ldapMapping,
|
||||
accessRights,
|
||||
groupMembership,
|
||||
groupDN,
|
||||
userAttribute,
|
||||
groupFilter,
|
||||
groupAttribute,
|
||||
groupNameAttribute,
|
||||
authentication,
|
||||
login,
|
||||
password,
|
||||
acceptCertificate,
|
||||
} = ldapFormData;
|
||||
|
||||
const settings = {
|
||||
EnableLdapAuthentication: enableLdapAuthentication,
|
||||
AcceptCertificate: acceptCertificate,
|
||||
StartTls: startTls,
|
||||
Ssl: ssl,
|
||||
SendWelcomeEmail: sendWelcomeEmail,
|
||||
Server: server,
|
||||
UserDN: userDN,
|
||||
PortNumber: portNumber,
|
||||
UserFilter: userFilter,
|
||||
LoginAttribute: loginAttribute,
|
||||
LdapMapping: ldapMapping,
|
||||
AccessRights: accessRights,
|
||||
GroupMembership: groupMembership,
|
||||
GroupDN: groupDN,
|
||||
UserAttribute: userAttribute,
|
||||
GroupFilter: groupFilter,
|
||||
GroupAttribute: groupAttribute,
|
||||
GroupNameAttribute: groupNameAttribute,
|
||||
Authentication: authentication,
|
||||
Login: login,
|
||||
Password: password,
|
||||
};
|
||||
|
||||
// console.log({ settings });
|
||||
|
||||
export function saveLdapSettings(settings) {
|
||||
return request({
|
||||
method: "post",
|
||||
url: `/settings/ldap`,
|
||||
|
Loading…
Reference in New Issue
Block a user