-
Notifications
You must be signed in to change notification settings - Fork 2.1k
public.php and public-files endpoints won't report locking support #36402
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
Conversation
|
Need to check if this is the approach we want or not. The PR fixes the issue mentioned, but it break quite a bunch of lock tests, which would need to be removed or adjusted. Note that this could be dangerous if the file is locked and someone edits the file through the public link at the same time. |
Codecov Report
@@ Coverage Diff @@
## master #36402 +/- ##
============================================
- Coverage 65.16% 64.86% -0.31%
- Complexity 19802 19815 +13
============================================
Files 1271 1272 +1
Lines 74760 74790 +30
Branches 1309 1309
============================================
- Hits 48719 48513 -206
- Misses 25655 25891 +236
Partials 386 386
Continue to review full report at Codecov.
|
This is fixed. Failing test caused by a infrastructure problem.
Still happening. The file is edited through the public link even though the file is locked. |
For public links: * LOCK and UNLOCK methods won't be reported as allowed * lock information (d:lockdiscovery) and support (d:supportedlock) will be shown in the propfind if requested (lock support is needed for libreoffice to try to lock the file) * trying to lock the file through public link will either throw a Locked exception if there is a lock in place, or MethodNotAllowed if there are no locks (the Locked exception is needed for libreoffice to show a popup warning the user that the file is locked)
|
Copying from the commit: For public links:
This means that the file can't be locked through the public link, but both the "Locked" exception trying to unlock and also the information in the propfind should be enough information to know if the file is locked or not. There is still some polishing to do in the PR, but I think this is the behaviour we want. |
1edf4a4 to
07969ef
Compare
07969ef to
941822f
Compare
|
coverage upload errors.... the tests are fine |
|
@micbar this is in the current server sprint. |
|
Note that this PR does not fix #36064 - if a folder/file has been locked by the owner, and a public link share of it has been made, then the public can still upload files etc into the locked folder... So this PR is stage1, fixing up a bit of locking support stuff. But actually it will be good to also "some day soon" address #36064 so that, e.g. public uploads into a locked folder will get rejected. |
This looks OK to merge. |
Description
Remove support for persistent locking in the public endpoints. Requested in #34394 (comment)
Note that locking wasn't supported in public endpoints as seen in https://github.com/owncloud/core/blob/master/apps/dav/lib/Files/FileLocksBackend.php#L166-L168 . This PR will remove the lockdiscovery from the propfind response
Related Issue
#34394
Motivation and Context
Libreoffice was showing an error trying to lock the file through the public endpoint. Now it won't try to lock the file.
How Has This Been Tested?
Manually tested using the steps defined in #34394
Screenshots (if appropriate):
Types of changes
Checklist: