-
Notifications
You must be signed in to change notification settings - Fork 8
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
Collaborative locking #54
Conversation
81c0b3f
to
c211bbe
Compare
1d53d77
to
1efd406
Compare
90ab895
to
ac9b3a1
Compare
3477431
to
6973874
Compare
29c2c69
to
bdefda1
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.
Impressive!
Just a few minor remarks.
|
||
|
||
|
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.
Any reason for those empty lines? 😁
``` | ||
curl -X LOCK \ | ||
--url http://admin:admin@nextcloud.dev.local/remote.php/dav/files/admin/myfile.odt \ | ||
--header 'X-User-Lock: 1' |
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.
Maybe we should explain that this specifies the lock type. It's pretty self explanatory but still.
lib/Command/Lock.php
Outdated
@@ -136,14 +136,16 @@ protected function execute(InputInterface $input, OutputInterface $output) { | |||
$this->getStatus($input, $output, $fileId); | |||
$this->unlockFile($input, $output, $fileId); | |||
} catch (SuccessException $e) { | |||
return; | |||
return 0; |
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.
We could set the return type for this method. Or does it break the signature and then Php complains about a superclass method not being overloaded?
@@ -94,7 +96,9 @@ public function locking(string $fileId): DataResponse { | |||
$user = $this->userSession->getUser(); | |||
$file = $this->fileService->getFileFromId($user->getUID(), (int)$fileId); | |||
|
|||
$lock = $this->lockService->lockFile($file, $user); | |||
$lock = $this->lockService->lock(new LockContext( |
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.
Any reason to name this controller's methods "locking" and "unlocking" instead of "lock" and "unlock"?
Signed-off-by: Julius Härtl <jus@bitgrid.net> WIP: working but no public api Signed-off-by: Julius Härtl <jus@bitgrid.net>
7b514ab
to
6e3e57c
Compare
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
… lock change Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
c516723
to
78e7373
Compare
29172c8
to
32eb85d
Compare
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
bac1cf4
to
4d3f9f2
Compare
Great work here! Thanks. 👏 |
Fixes #51
Fixes #57
Fixes #44
Only the parent etags should be updated, however this currently does not seem to propagate then to the parents of an incoming file share for the recipientWould require eTag for metadata changes server#8477This will enable the clients to already start with their implementation of file locking.