Fix/id docs ldap join and approval status - #7995
Merged
vitormattos merged 4 commits intoAug 22, 2026
Merged
Conversation
|
Thanks for opening your first pull request in this repository! ✌️ |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
LDAP accounts are missing from oc_users, so an inner join hid their identification documents. The uploader placeholder sign request also blocked approval from reaching SIGNED. Fixes LibreSign#7861 Fixes LibreSign#7860 Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
Restore the system policy after the spec and match the English Documents Validation sidebar label so later Playwright tests are not affected. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com>
lfals
force-pushed
the
fix/id-docs-ldap-join-and-approval-status
branch
from
August 21, 2026 18:54
f40fb01 to
d9f6c6f
Compare
vitormattos
requested changes
Aug 21, 2026
Comment on lines
+1125
to
+1129
| try { | ||
| $idDocs = $this->idDocsMapper->getByFileId($fileId); | ||
| } catch (\Throwable) { | ||
| return null; | ||
| } |
Member
There was a problem hiding this comment.
Could we catch only DoesNotExistException here instead of \Throwable?
A missing IdDocs entry is expected for regular files, but an unexpected database/programming error should probably not be silently treated as “not an identification document”.
Catch only DoesNotExistException for missing id docs, store visual screenshots under build/, and keep e2e selectors English-only. Signed-off-by: Luis Amorim <luisfelipeamorim@hotmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Member
|
/backport to stable34 |
Member
|
/backport to stable33 |
Member
|
/backport to stable32 |
This was referenced Aug 22, 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.
Resolves: #7861
Resolves: #7860
📝 Summary
Identification documents from LDAP/SSO accounts disappeared from the account page because
IdDocsMapperused an inner join onoc_users. Those backends do not create a row there, solist()dropped the files even when filtering byuserId.Approving an identification document also never reached
SIGNED. The uploader gets a DRAFTSignRequestso the account page can show a display name;evaluateStatusFromSigners()counted that placeholder as a required signature, so the file stayedPARTIAL_SIGNEDafter the approver signed.This change left-joins
userswhen listing identification documents, and excludes only that uploader placeholder from status evaluation. Sequential-signing DRAFT signers on normal files are unchanged.🧪 How to test
adminas an approver./apps/libresign/f/account) and confirm the Identification documents section is visible.tests/php/fixtures/pdfs/small_valid.pdf)./apps/libresign/f/docs/id-docs/validation). The row should show waiting for approval and a Sign action.adminif needed, then click Sign and complete the signature.oc_users. The uploaded document must remain visible on that account.composer test:unit -- --filter IdDocsMapperTest composer test:unit -- --filter testIdDocApprovalReachesSignedWhenUploaderPlaceholderIsUnsigned composer test:unit -- --filter testDraftSignersStillCountWhenFileIsNotAnIdentificationDocument npx playwright test playwright/e2e/id-docs-visual.spec.ts⚙️ API / Back‑end changes
IdDocsMapper::getQueryBuilder()alwaysleftJoinsusers, so listing byuserIdstill returns documents when the account is missing fromoc_users.SignFileService::evaluateStatusFromSigners()ignores the identification-document uploader placeholder (id_docs.sign_request_id) so approval can reachSIGNED.✅ Checklist
🤖 AI (if applicable)