Skip to content

Commit 01cec78

Browse files
committed
Refactor PasswdService to include identity information in password change job execution
1 parent 30ddfc8 commit 01cec78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/management/passwd/passwd.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ export class PasswdService extends AbstractService {
9595

9696
public async reset(data: ResetPasswordDto): Promise<[Jobs, any]> {
9797
const tokenData = await this.decryptToken(data.token);
98-
const identity = await this.identities.findOne({ 'inetOrgPerson.uid': tokenData.uid });
98+
const identity = await this.identities.findOne({ 'inetOrgPerson.uid': tokenData.uid }) as Identities;
9999

100100
return await this.backends.executeJob(
101101
ActionType.IDENTITY_PASSWORD_RESET,
102102
identity._id,
103-
{ uid: tokenData.uid, newPassword: data.newPassword },
103+
{ uid: tokenData.uid, newPassword: data.newPassword, ...pick(identity, ['inetOrgPerson']) },
104104
{
105105
async: false,
106106
},

0 commit comments

Comments
 (0)