Skip to content

Commit

Permalink
fix(signature-collection): Not stop paper signatures when already sig…
Browse files Browse the repository at this point in the history
…ned (#16137)
  • Loading branch information
juni-haukur authored and thoreyjona committed Oct 2, 2024
1 parent 2edc3ac commit 9dab911
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,17 @@ export class SignatureCollectionService {
user: User,
input: SignatureCollectionCanSignFromPaperInput,
): Promise<boolean> {
const signee = await this.signee(user, input.signeeNationalId)
const signee = await this.signatureCollectionClientService.getSignee(
user,
input.signeeNationalId,
)
const list = await this.list(input.listId, user)
return signee.canSign && list.area.id === signee.area?.id
// Current signatures should not prevent paper signatures
const canSign =
signee.canSign ||
(signee.canSignInfo?.length === 1 &&
signee.canSignInfo[0] === ReasonKey.AlreadySigned)

return canSign && list.area.id === signee.area?.id
}
}

0 comments on commit 9dab911

Please sign in to comment.