Add public API for owner based file locking#31676
Merged
Conversation
This was referenced Mar 23, 2022
ee66ba6 to
76d3005
Compare
CarlSchwan
reviewed
Mar 24, 2022
Merged
Merged
Signed-off-by: Julius Härtl <[email protected]>
8fdc3c4 to
40f1ad6
Compare
Member
Author
|
🏓 for another review round, would be great to get this in for the next beta |
julien-nc
approved these changes
Apr 5, 2022
Member
julien-nc
left a comment
There was a problem hiding this comment.
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!
Member
Author
|
Right, LockContext seems far better fitting indeed, will rename that. |
Merged
Signed-off-by: Julius Härtl <[email protected]>
80ce1a2 to
9b408d5
Compare
Member
|
failed tests unrelated, merging |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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