Repository navigation
fix: deliver sign invitations to email-identified existing users - #9429
Open
vitormattos wants to merge 10 commits into
Open
vitormattos wants to merge 10 commits into
vitormattos wants to merge 10 commits into
Conversation
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Contributor
Code Metrics Report
Details | | main (b02d0b8) | #9429 (a263225) | +/- |
|---------------------|----------------|-----------------|-------|
+ | Coverage | 76.1% | 76.2% | +0.0% |
| Files | 500 | 500 | 0 |
| Lines | 28578 | 28576 | -2 |
+ | Covered | 21776 | 21779 | +3 |
- | Test Execution Time | 1s | 2s | +1s |Code coverage of files in pull request scope (82.0% → 86.7%, patch 100.0%)
Reported by octocov |
Member
Author
|
/backport to stable35 |
Member
Author
|
/backport to stable34 |
Member
Author
|
/backport to stable33 |
Remove unused listener dependencies and resolve account notification preferences by UID, leaving email-identified signers on mail delivery. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Use event inputs and delivery outputs instead of passing messages through MailChannel and MailService in listener tests. Cover invitation, reminder, account preferences, shared emails, cancellation and signed notices. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Assert cancellation preferences at the listener boundary and verify initial versus reminder mail arguments at the channel boundary. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Keep account-based cancellation preferences when a signer was identified by email, without reintroducing invitation suppression from issue #9425. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…coupling Cover existing-account cancellation opt-outs, external recipients, unknown methods and empty addresses. Keep mock configuration readable and assert observable delivery intents instead of internal invocation sequences. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Cover transport mapping for signed and canceled events, legacy handling of shared cancellation addresses and child envelope duplicate avoidance. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
The Nextcloud user manager returns an empty list when no users match an email address. Model that contract explicitly in the regression test, preventing count(null) across the PHPUnit database matrix. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
This branch has not been deployed
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.
Problem
Fixes #9425.
An email-identified signer whose address belongs to an existing Nextcloud account could receive neither the signing invitation nor an in-app notification: the invitation-mail path consulted an account's opt-out despite the recipient being explicitly identified via email. In-app and activity invitations are restricted to
accountsigners.Behavior and architecture
email-identified signer regardless of whether that address belongs to a Nextcloud account; never turn the email address into a Nextcloud UID.email-identified recipients. They must not receive previously suppressed cancellation messages. Foraccount-identified recipients, preferences are checked by selected UID.Regression tests and testability
MailNotifyListenerTestdrives the publichandle(Event)method and inspects emittedNotificationMessageobjects rather than invokingMailChannelinside the listener tests. Readable small event factories remove repeated internal setup, and preference fixtures use UID-sensitive returns to assert observable delivery outcomes instead of internal call counts.Covered: existing GUID-style UID vs email; external email signer; observer; reminder vs first invitation; account enable/disable preference; shared email; deleted/unresolved accounts; empty and unsupported identifiers; cancellation (unique linked account enabled/disabled, external, shared); owner-signed messages and envelope child suppression.
NotificationChannelsTestindependently verifies mapping of first invitations, reminders, signed-file and cancellation messages to the expectedMailServicecalls. Observer validation links are covered in the existingMailServiceTest.Validation
main(original baseb02d0b82e3abe346085c8bfe059e7ca4bf8f6bfd). The nextmaincommit only updates Transifex translations.testExternalEmailSignerReceivesCancellationbecauseIUserManager::getByEmail()was not stubbed for an external address and returnednullin PHPUnit;count(null)caused aTypeError. Fixed by explicitly configuring[]for the missing account, without altering production behavior.f7d25426f44d9786f43ce1b3d46a365ef20d8320. All four PHPUnit database workflows (SQLite, MySQL, MariaDB, PostgreSQL) passed on this head. At the last verification, 19/21 workflows had passed; Playwright and Behat PostgreSQL were still running. Do not merge until final checks are verified.maincontract.No automatic merge requested.