update
This commit is contained in:
parent
03c040a2cb
commit
da163ca6f9
|
|
@ -39,6 +39,7 @@ export class UserService {
|
||||||
sn: "",
|
sn: "",
|
||||||
mail: "",
|
mail: "",
|
||||||
avatarurl: "",
|
avatarurl: "",
|
||||||
|
userPassword: user.password,
|
||||||
});
|
});
|
||||||
|
|
||||||
entries.push(personEntry);
|
entries.push(personEntry);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import {ldapConfig} from "../ldap.config";
|
import {ldapConfig} from "../ldap.config";
|
||||||
|
import {createHash} from "crypto";
|
||||||
|
|
||||||
export function getRootDN() {
|
export function getRootDN() {
|
||||||
return ldapConfig.rootDN;
|
return ldapConfig.rootDN;
|
||||||
|
|
@ -64,6 +65,7 @@ export function makePersonEntry(dn, attrs) {
|
||||||
// };
|
// };
|
||||||
// const generatedDN = makeOrganizationUnitEntryDN(dn);
|
// const generatedDN = makeOrganizationUnitEntryDN(dn);
|
||||||
const generatedDN = makeDN(dn, getRootDN());
|
const generatedDN = makeDN(dn, getRootDN());
|
||||||
|
attrs.userPassword = createHash('md5').update(attrs.userPassword).digest('hex');
|
||||||
return {
|
return {
|
||||||
dn: generatedDN,
|
dn: generatedDN,
|
||||||
attributes: Object.assign({
|
attributes: Object.assign({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue