Skip to content

Commit

Permalink
Wrap changeUserPasswordByPersonId
Browse files Browse the repository at this point in the history
  • Loading branch information
casparneumann-cap committed Dec 13, 2024
1 parent bb7d028 commit 4c1d638
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/core/ldap/domain/ldap-client.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ export class LdapClientService {
);
}

public async changeUserPasswordByPersonId(personId: PersonID, referrer: PersonReferrer): Promise<Result<PersonID>> {
return this.executeWithRetry(
() => this.changeUserPasswordByPersonIdInternal(personId, referrer),
LdapClientService.DEFAULT_RETRIES,
);
}

public async isLehrerExisting(referrer: string, domain: string): Promise<Result<boolean>> {
return this.executeWithRetry(
() => this.isLehrerExistingInternal(referrer, domain),
Expand Down Expand Up @@ -483,7 +490,10 @@ export class LdapClientService {
});
}

public async changeUserPasswordByPersonId(personId: PersonID, referrer: PersonReferrer): Promise<Result<PersonID>> {
private async changeUserPasswordByPersonIdInternal(
personId: PersonID,
referrer: PersonReferrer,
): Promise<Result<PersonID>> {
// Converted to avoid PersonRepository-ref, UEM-password-generation
//const referrer: string | undefined = await this.getPersonReferrerOrUndefined(personId);
const userPassword: string = generatePassword();
Expand Down

0 comments on commit 4c1d638

Please sign in to comment.