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>
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>
When editing a signer, hide the search field since the signer is
already defined. Only show the search field when adding a new signer.
This simplifies the UI and prevents confusion.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
When editing an existing signer, display only the tab corresponding
to the identification method used by that signer (account, email, etc).
When adding a new signer, show all available tabs as before.
This prevents confusion and improves UX by focusing on the relevant
method for each context.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Save user's selected tab (Account/Email) in the 'Add new signer' modal
to userconfig store. The preference is now persisted across modal
closures and page reloads, improving user experience by remembering
the last selected identification method.
Changes:
- Add activeTab state to RequestSignatureTab component
- Load saved tab preference from userconfig store on mount
- Save tab changes to backend with debounce (500ms)
- Add signer_identify_tab to AccountService config output
- Use snake_case naming convention for consistency with backend
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add clickable links to Twig documentation (https://twig.symfony.com/)
in both Signature Stamp and Footer Template editor sections using
the v-linkify directive from @nextcloud/vue.
This improves user experience by providing direct access to Twig
syntax documentation when configuring custom templates.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Replace sad face icon with alert icon
- Add LibreSign logo header
- Use NcEmptyContent component
- Add card container with shadow
- Improve mobile responsiveness
- Clean up CSS and remove redundant styles
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add reset() method to AppConfigOverwrite that clears overWrite and deleted arrays and returns self
- Integrate reset() directly into getMockAppConfig() to ensure clean state on every call
- All tests now automatically get clean AppConfig state without explicit reset calls
- Prevents state pollution across test suites by resetting at the source
- Simplifies test code by removing need for separate reset wrapper method
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
The CA ID (libresign-ca-id:...) in OrganizationalUnit should only be
filtered out when the certificate is not generated (isSetupOk() returns
false). When the certificate is successfully generated, the CA ID must
be preserved in the API response.
This ensures:
- Generated certificates: CA ID is visible (expected behavior)
- Failed/not generated: CA ID is filtered to prevent stale data in form
Integration tests validated:
- features/account/signature.feature:2 (OpenSSL)
- features/account/signature.feature:23 (CFSSL)
- features/admin/certificate_openssl.feature:2
- features/admin/certificate_openssl.feature:35
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Prevent test state pollution by ensuring config_path is deleted
in setUp(). This fixes failures in OpenSslHandlerTest where the
temporary config path from AEngineHandlerTest was persisting
through the shared appConfig mock, causing tests that expect
properly formatted PKI directory names to fail.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Filter configPath from API response when certificate is not generated to prevent
form pre-population with outdated generation numbers that cause validation errors.
Filter CA ID (libresign-ca-id:*) from OrganizationalUnit field to prevent users
from submitting stale generation values that conflict with certificate validation.
Refactor toArray() method by extracting logic into dedicated methods:
- getConfigPathForApi(): Returns empty string for non-generated certificates
- removeCaIdFromOrganizationalUnit(): Filters CA IDs from OU arrays
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Delete PDFs from root fixtures directory.
Files now organized in tests/php/fixtures/pdfs/ with catalog.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Create catalog system for managing real-world signed PDFs:
- PdfFixtureCatalog class with YAML-based metadata
- Filter by DocMDP level, TSA, signature tool, count
- Provides expected validation results for tests
- Includes PdfFixture wrapper for easy access
- Store real PDFs in tests/php/fixtures/pdfs/ directory
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Delete trait after migrating all methods to PdfGenerator.
The trait pattern was unnecessary for stateless utility methods.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Consolidate PDF fixture generation into a single static class:
- Migrate all methods from PdfFixtureTrait to PdfGenerator
- Convert trait methods to public static methods
- Maintain all existing functionality
- Includes 20+ methods for ISO 32000-1 edge case testing
This improves code organization and eliminates trait usage.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add isDocMdpNoChangesAllowed() method to files store
- Update canAddSigner() to check DocMDP level 1 with existing signers
- Only blocks after first signer is added (not before)
- Encapsulates logic in reusable method
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add docmdp_level to SELECT and GROUP BY in SignRequestMapper
- Format docmdpLevel as integer in API response
- Add docmdpLevel to FileService::loadLibreSignData()
- Ensures frontend receives per-file DocMDP configuration
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>