Skip to content

Conversation

@vitormattos
Copy link
Member

@vitormattos vitormattos commented Jul 21, 2025

Pull Request Description

This pull request adds an icon to the right of the files, in the files app, showing the file signature status on the original and the signed files. The original will have the status 'Original file signed elsewhere' and the signed file will have the status 'Partially signed' and 'Signed', depending on the signing progress.

Before: After:
before after

To test the feature, after checking out to the pull request:

  • upload a PDF file to Nextcloud using the files app;
  • request the signature from two different users;
  • sign the file with one of the requested users;
  • the original file will show a green sign icon, with the text 'original file' when hovering over it;
  • the signed file will show a yellow ½ icon, with the text 'partially signed' when hovering over it;
  • now sign the file with the second requested user;
  • the signed file will show a blue sign icon, with the text 'signed' when hovering over it.

Related Issue

Issue Number: #4160

Pull Request Type

  • Feature

Pull request checklist

  • Did you explain or provide a way of how can we test your code ?
  • If your pull request is related to frontend modifications provide a print of before and after screen
  • Did you provide a general summary of your changes ?
  • Try to limit your pull request to one type, submit multiple pull requests if needed
  • I implemented tests that cover my contribution

@github-project-automation github-project-automation bot moved this to 0. Needs triage in Roadmap Jul 21, 2025
@AntDavidLima AntDavidLima self-assigned this Jul 21, 2025
@AntDavidLima AntDavidLima force-pushed the feat/show-signature-status-on-files-app branch 4 times, most recently from 390e315 to b10bda8 Compare July 21, 2025 18:15
@vitormattos vitormattos added this to the Next Major (33) milestone Sep 12, 2025
Only show signature icon on files of pdf type and if the LibreSign
certificate is ok

Signed-off-by: David Lima <[email protected]>
Change code style, add copyright text and fix end-point response type to
pass previously failing tasks

Signed-off-by: David Lima <[email protected]>
… ids

Change the end-point filter parameter from nodeId to nodeIds, allowing
the filtering by multiple node ids

Signed-off-by: David Lima <[email protected]>
Update front end calls to /list/list end-point so it passes node ids
filter as an array

Signed-off-by: David Lima <[email protected]>
Change the status icon and label based on the response from the API

Signed-off-by: David Lima <[email protected]>
Add the property signedNodeId to the /file/list end-point to show an
icon on the original and signed file, according to the signing status

Signed-off-by: David Lima <[email protected]>
Alter the Copyright text year to the file creation year

Signed-off-by: David Lima <[email protected]>
Send function parameter already with the right name, so a useless if
condition is avoided

Signed-off-by: David Lima <[email protected]>
Add column signed_node_id to getFiesAssociatedFilesWithMeQueryBuilder
method query group by

Signed-off-by: David Lima <[email protected]>
@vitormattos vitormattos force-pushed the feat/show-signature-status-on-files-app branch from 91138b6 to 282ff04 Compare December 3, 2025 03:40
When clicking on the signature status inline icon, it now opens
the LibreSign sidebar tab for the file, providing quick access
to signature details and actions.

Signed-off-by: Vitor Mattos <[email protected]>
Apply guard clauses pattern to reduce indentation and improve
code readability by returning early when conditions are not met.

Signed-off-by: Vitor Mattos <[email protected]>
The registerDavProperty function from @nextcloud/files is deprecated.
Use the non-deprecated import from @nextcloud/files/dav instead.

Signed-off-by: Vitor Mattos <[email protected]>
The method name is self-explanatory, making the docblock comment
unnecessary.

Signed-off-by: Vitor Mattos <[email protected]>
Add libresign- prefix to DAV properties (signature-status and
signed-node-id) to follow Nextcloud naming conventions and avoid
potential naming conflicts with other apps.

Signed-off-by: Vitor Mattos <[email protected]>
@vitormattos vitormattos force-pushed the feat/show-signature-status-on-files-app branch from d411ba4 to 9664ed9 Compare December 3, 2025 04:01
When fileIdExists performs a database query, store the results in the
file property to implement proper lazy loading and avoid redundant
queries.

Signed-off-by: Vitor Mattos <[email protected]>
Add Behat integration test to validate that LibreSign properties
are correctly injected into WebDAV PROPFIND responses.

Signed-off-by: Vitor Mattos <[email protected]>
Add new Behat steps for WebDAV testing:
- user :user uploads file :source to :path
- user :user gets WebDAV properties for :path
- the WebDAV response should contain property :property with value :value
- fetch WebDAV property :property to :alias

Include helper methods davRequest() and parseXml() to avoid duplication.

Signed-off-by: Vitor Mattos <[email protected]>
@vitormattos
Copy link
Member Author

/backport to stable32

@vitormattos
Copy link
Member Author

/backport to stable31

@vitormattos vitormattos merged commit b0f4f24 into main Dec 3, 2025
65 checks passed
@github-project-automation github-project-automation bot moved this from 0. Needs triage to 4. to release in Roadmap Dec 3, 2025
@vitormattos vitormattos deleted the feat/show-signature-status-on-files-app branch December 3, 2025 05:04
@backportbot-libresign
Copy link

The backport to stable32 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable32
git pull origin stable32

# Create the new backport branch
git checkout -b backport/5225/stable32

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 1bceacfb b7da03fe cee739a8 a712b3bc 77499f35 d6e00932 55c19628 7bc299be 68d5cfc6 8b1936a1 d17e426f 79cb8dbf 46a253bc 58e2da19 a495a480 370d1ecb ca743594 ab994c42 d47ab739 09df58de ae449c2b 11eb0487 a0b77abf 282ff04c b5c10808 440a72e6 ebf107f2 c82875fc 9664ed97 eac9a458

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/5225/stable32

Error: Failed to push branch backport/5225/stable32: fatal: could not read Username for 'https://github.com': No such device or address


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@vitormattos
Copy link
Member Author

/backport to stable32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 4. to release

Development

Successfully merging this pull request may close these issues.

3 participants