-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add public API for owner based file locking #31676
Conversation
ee66ba6
to
76d3005
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Signed-off-by: Julius Härtl <jus@bitgrid.net>
8fdc3c4
to
40f1ad6
Compare
🏓 for another review round, would be great to get this in for the next beta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understood the concept of the LockScope class after reading its implementation but I don't feel it matches the name (maybe it's only me). What do you think about renaming it to LockInfo, LockData or LockContext?
Other than that, nicely done!
Right, LockContext seems far better fitting indeed, will rename that. |
Signed-off-by: Julius Härtl <jus@bitgrid.net>
80ce1a2
to
9b408d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
failed tests unrelated, merging |
This adds a lightweight public interface for handling manual file locking within the files_lock app and to allow other apps like Text, Collabora or ONLYOFFICE to integrate with it.
Required for nextcloud/files_lock#54
Locks are separated into three different types:
This lock type is initiated by a user manually through the WebUI or Clients and will limit editing capabilities on the file to the lock owning user.
This lock type is created by collaborative apps like Text or Office to avoid outside changes through WevDAV or other apps.
The OCP parts are mainly for exposing the ability to lock/unlock for apps and to give the files_lock app a way to register and then be triggered by the apps while the actual locking implementation is kept in the LockProvider and DAV Plugin from files_lock app.
Registering through IBootstrap was considered, but decided against as this is only limited to the one app.
App integrations