fix: envelope visible elements validation#6918
Merged
vitormattos merged 11 commits intomainfrom Feb 17, 2026
Merged
Conversation
ValidateHelper::validateSignerIsOwnerOfPdfVisibleElement() was rejecting visible elements that belong to child sign requests of an envelope. When signing an envelope, the documentElement.signRequestId points to the child file sign request, not the envelope-level sign request. This caused 'Invalid data to sign file' error. Also fixes validateUserHasNecessaryElements() which queried file elements by envelope fileId/signRequestId returning empty results for envelopes, since elements belong to child files. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
FileService::loadVisibleElements() only queried the envelope file ID, missing all visible elements that belong to child files. Now queries child file IDs and uses per-child metadata for coordinate calculation. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Adds testValidateVisibleElementsRelationAcceptsEnvelopeChildElements which verifies that visible elements belonging to child sign requests are accepted when signing an envelope document. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Adds testEnvelopeVisibleElementsIncludesChildFileElements which verifies that FileService::loadVisibleElements() includes elements from child files when processing an envelope document. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Update testGetJobArgumentsWithoutCredentialsIncludesContext to set 'elements' property instead of 'elementsInput', matching the current getJobArgumentsWithoutCredentials() implementation. Also use real entities instead of mocks for classes with final getId(). Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Sign.vue elements() and needCreateSignature computed properties only matched against the single envelope-level signRequestId. Now collects all child file signRequestIds (where me:true) into a Set, so visible elements from child files are correctly displayed in the sidebar. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
SignPDF.vue loadEnvelopePdfs() now populates signStore.document.files with envelope child file data so downstream components can access child file signers and visible elements. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
getVisibleElementsFromDocument() now also collects visible elements from document.files entries, covering envelope documents where elements are stored in child file signers. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Tests that elements() computed collects signRequestIds from child file signers and correctly filters visible elements for envelope documents. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Tests getVisibleElementsFromDocument() for both regular documents and envelope documents with child files containing visible elements. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Tests that loadEnvelopePdfs() populates signStore.document.files with child file data from envelope responses. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Member
Author
|
/backport to stable32 |
Member
Author
|
/backport to stable33 |
This was referenced Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.