Skip to content

Conversation

@benjaminfrueh
Copy link

@benjaminfrueh benjaminfrueh commented Jan 7, 2026

Summary

Implements federated file locking, allowing locks to propagate between servers.

Changes

- Added OCS api endpoint to check locks by share token

  • Request locks using webdav propfind
  • Check remote locks before allowing file operations
  • Show hostname in lock display for remote locks (e.g. [email protected])

Fixes #896

Requires nextcloud/server#57914

@benjaminfrueh benjaminfrueh added enhancement New feature or request 3. to review labels Jan 7, 2026
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Office team Jan 7, 2026
@benjaminfrueh benjaminfrueh force-pushed the feat/federated-file-locking branch 2 times, most recently from 421fdea to 1fbdd05 Compare January 7, 2026 20:40
@benjaminfrueh benjaminfrueh moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 📝 Office team Jan 8, 2026
@max-nextcloud max-nextcloud removed their request for review January 8, 2026 19:21
@max-nextcloud
Copy link
Collaborator

unassigning myself as a reviewer as I do not have time to look into this.

@github-actions
Copy link
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@benjaminfrueh benjaminfrueh marked this pull request as draft January 28, 2026 23:58
@benjaminfrueh benjaminfrueh force-pushed the feat/federated-file-locking branch from 17a6953 to ad0002b Compare January 29, 2026 16:03
@benjaminfrueh benjaminfrueh marked this pull request as ready for review January 29, 2026 16:05
@benjaminfrueh benjaminfrueh moved this from 🏗️ In progress to 👀 In review in 📝 Office team Jan 29, 2026
@benjaminfrueh benjaminfrueh force-pushed the feat/federated-file-locking branch 2 times, most recently from f69eed0 to 2029c30 Compare January 29, 2026 16:23
Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments

@benjaminfrueh
Copy link
Author

Some minor comments

Thank you for the feedback, I made changes accordingly.

@benjaminfrueh benjaminfrueh force-pushed the feat/federated-file-locking branch 2 times, most recently from b891482 to 3cdea3e Compare January 29, 2026 19:08
@benjaminfrueh
Copy link
Author

/backport to stable33

@benjaminfrueh
Copy link
Author

/backport to stable32

Signed-off-by: Benjamin Frueh <[email protected]>

fix: use ocp methods instead of sql queries and add path param for folder support

Signed-off-by: Benjamin Frueh <[email protected]>

feat: request federated locks using webdav propfind

Signed-off-by: Benjamin Frueh <[email protected]>

Update lib/Service/LockService.php

Co-authored-by: Julius Knorr <[email protected]>
Signed-off-by: Benjamin Früh <[email protected]>

refactor: rename propfind event and use first userfolder node directly

Signed-off-by: Benjamin Frueh <[email protected]>

Apply suggestions from code review

Co-authored-by: Julius Knorr <[email protected]>
Signed-off-by: Benjamin Früh <[email protected]>
@benjaminfrueh benjaminfrueh force-pushed the feat/federated-file-locking branch from 3cdea3e to b826403 Compare January 30, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

[Bug]: Temporary files lock & federation

5 participants