[stable31] feat: custom message for signers#6223
Merged
vitormattos merged 17 commits intostable31from Dec 17, 2025
Merged
Conversation
Include signer description in notification metadata when incrementing notification counter. This allows tracking custom messages sent to signers for each notification attempt. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add optional description parameter to notifyUnsignedUser and notifySignDataUpdated methods. When provided, the custom message is prepended to the email body, allowing personalized instructions for signers. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add explicit check for Activity admin (global) setting before checking user preference in email notifications. This ensures that when an admin disables email notifications globally, users cannot override it with their personal settings. The admin setting acts as a gate that must be enabled for user preferences to take effect. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add explicit check for Activity admin (global) setting before checking user preference for in-app notifications. This ensures consistency across all notification channels and prevents users from enabling notifications when disabled globally by the admin. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Support custom signer descriptions in SMS, Signal, Telegram, WhatsApp, and XMPP notifications. The description is prepended to the notification message when provided, allowing personalized instructions through all supported notification channels. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add description, displayName, notify, and acceptsEmailNotifications fields to OpenAPI response type definitions for LibresignNewSigner and LibresignIdentifyAccount. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Include acceptsEmailNotifications field in search results for account method signers. This field indicates whether a user accepts email notifications based on both Activity admin settings and user preferences. Returns false when user has no email, Activity app is unavailable, or notifications are disabled at admin or user level. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Update OpenAPI schemas to include acceptsEmailNotifications in LibresignIdentifyAccount and description/displayName/notify in LibresignNewSigner types. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add switch-based UI to enable custom messages for signers during identification. The custom message field: - Appears conditionally based on method and email notification settings - Is hidden for account method when user doesn't accept email - Supports up to 500 characters with 3-row textarea - Resets when toggled off or signer changes to non-accepting account - Is saved as part of signer data Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add 'Customize message' action button in signature request sidebar for signed requests. The button: - Appears with Bell icon alongside other actions - Opens signer identification modal for message editing - Validates signer state, method, and email notification preferences - Is hidden when signer already signed, for current user, or when account method user doesn't accept email notifications Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add integration tests verifying acceptsEmailNotifications field in account search endpoint: - Returns true when both global and user settings enable notifications - Returns false when user explicitly disables notifications - Returns false when admin disables globally (even if user enables) Tests cover Activity app integration and admin/user setting precedence. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add integration tests for custom signer messages: - Account method with and without custom description - Email method with default and custom description via reminder - Verifies description appears in email body before default message - Uses Activity email notification settings in background setup Tests cover the complete flow from request creation to email delivery. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
When Activity app doesn't know about LibreSign's notification settings (common in test environments or fresh installations), we should allow notifications by default instead of blocking them. This fix checks if the Activity manager has the setting registered before enforcing the admin setting. If the setting is not found, notifications are allowed, respecting LibreSign's isDefaultEnabledMail() and isDefaultEnabledNotification() which return true. Fixes email and notification delivery in integration tests. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Changed CaIdentifierService to use system's instanceid from config.php - Removed custom instance_id generation logic using ISecureRandom - Updated unit tests to mock IConfig and verify correct instanceid usage - This fixes race condition in certificate generation during integration tests Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
This reverts commit 8f71e6c. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Change regex pattern from [a-z0-9]{10} (exactly 10 chars) to [a-z0-9]+
(one or more chars) to accept variable-length instance identifiers.
This makes tests more resilient to changes in instance ID generation
while maintaining validation of the CA ID format.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
05fd04c to
41e081e
Compare
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.
Backport of PR #6216