Skip to content

feat: docmdp per file#6187

Merged
vitormattos merged 11 commits intomainfrom
feat/docmdp-per-file
Dec 14, 2025
Merged

feat: docmdp per file#6187
vitormattos merged 11 commits intomainfrom
feat/docmdp-per-file

Conversation

@vitormattos
Copy link
Copy Markdown
Member

No description provided.

@vitormattos vitormattos added this to the Next Major (33) milestone Dec 14, 2025
@vitormattos vitormattos self-assigned this Dec 14, 2025
@github-project-automation github-project-automation Bot moved this to 0. Needs triage in Roadmap Dec 14, 2025
@vitormattos
Copy link
Copy Markdown
Member Author

/backport to stable32

@vitormattos
Copy link
Copy Markdown
Member Author

/backport to stable31

- Add migration to create docmdp_level column (SMALLINT, default 0)
- Add docmdpLevel property to File entity with getters/setters
- Add getDocmdpLevelEnum() and setDocmdpLevelEnum() methods
- DocMDP levels: 0=not certified, 1=no changes, 2=form fill, 3=annotations

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add DocMdpConfigService dependency to RequestSignatureService
- Create setDocMdpLevelFromGlobalConfig() method
- Save admin DocMDP configuration to file entity on creation
- Allows per-file DocMDP configuration instead of only global

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Update validateDocMdpAllowsSignatures() to check file's docmdpLevel first
- Falls back to PDF extraction for legacy files (level 0)
- Throws consistent error message for DocMDP level 1
- Prevents adding signatures to certified documents with no changes allowed

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>
- 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 NcNoteCard warning message for DocMDP level 1
- Add showDocMdpWarning computed property
- Warning only shows when button is hidden
- Prevents UI flash during state transitions
- Uses consistent error message with backend

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Add docmdpLevel to LibresignValidateFile schema in ResponseDefinitions
- Add DocMdpConfigService mock to RequestSignatureServiceTest
- Fix constructor parameter order in RequestSignatureServiceTest
- Mock validateDocMdpAllowsSignatures in SignFileServiceTest
- Mock getDocmdpLevelEnum to return NOT_CERTIFIED in test scenarios
- Fixes OpenAPI schema validation errors
- Fixes ArgumentCountError in RequestSignatureService tests
- Fixes enum mocking issues in SignFileService tests

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>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos vitormattos merged commit f89ec9b into main Dec 14, 2025
62 checks passed
@vitormattos vitormattos deleted the feat/docmdp-per-file branch December 14, 2025 19:46
@github-project-automation github-project-automation Bot moved this from 0. Needs triage to 4. to release in Roadmap Dec 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant