Fix/id docs ldap join and approval status - #7995
Open
lfals wants to merge 3 commits into
Open
Conversation
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>
|
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:
|
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>
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)