Skip to content

[stable31] fix: support nodeid for new files#6330

Merged
vitormattos merged 3 commits intostable31from
backport/6326/stable31
Jan 5, 2026
Merged

[stable31] fix: support nodeid for new files#6330
vitormattos merged 3 commits intostable31from
backport/6326/stable31

Conversation

@backportbot-libresign
Copy link
Copy Markdown

Backport of PR #6326

Support validating files by Nextcloud nodeId in addition to
LibreSign fileId. This enables creating signature requests
for files that haven't been registered in LibreSign yet.

The validateFile method now accepts 'nodeId' parameter and
validates it similarly to 'fileId', ensuring the file exists
and has the correct MIME type.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Enable FileService to retrieve nodes using Nextcloud nodeId
in addition to LibreSign fileId. This allows the service to
handle both registered LibreSign files and new Nextcloud files
in the same workflow.

The method now checks for 'nodeId' after 'fileId' and 'path',
maintaining backward compatibility while adding new functionality.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add comprehensive test coverage for:
- ValidateHelper nodeId validation (success, invalid nodeId, missing user)
- FileService nodeId-based node retrieval
- Precedence of fileId over nodeId when both are provided

These tests ensure the new nodeId functionality works correctly
while maintaining backward compatibility with existing fileId behavior.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@github-project-automation github-project-automation Bot moved this to 0. Needs triage in Roadmap Jan 5, 2026
@backportbot-libresign backportbot-libresign Bot added this to the Next Patch (31) milestone Jan 5, 2026
@vitormattos vitormattos merged commit 5049fb0 into stable31 Jan 5, 2026
62 checks passed
@vitormattos vitormattos deleted the backport/6326/stable31 branch January 5, 2026 22:51
@github-project-automation github-project-automation Bot moved this from 0. Needs triage to 4. to release in Roadmap Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant