-
Notifications
You must be signed in to change notification settings - Fork 9
Collaborative locking #54
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
46da347
Implement separate lock type for collaborative editing
juliusknorr 451f2c5
Switch to OCP proposal
juliusknorr 4ca68cd
Stick to 7.4 for composer dependencies
juliusknorr a9e379e
Unify lock service methods to use the LockScope and propagate ETag on…
juliusknorr 62dae1e
Adjust to OCP review comments
juliusknorr ec2899a
Adapt LockScope to LockContext rename
juliusknorr 9e5f510
Add tests for etag changes
juliusknorr f1cca4d
Update file etag and propagate it with the proper path
juliusknorr d932fd0
Limit Nextcloud compatibility to 24
juliusknorr 4d70749
Extract displayname fetching
juliusknorr d0fb12c
Add separate status code if the lock is not found on unlock
juliusknorr 6612dc9
Remove unused method
juliusknorr 8b1a881
Expose token locks the same as user locks through our properties
juliusknorr d1fd060
Remove unused dependency that tries to obtain the user session too early
juliusknorr 6bd03c5
Add response data to OCS controllers
juliusknorr a271a40
Some more cleanup
juliusknorr 78e7373
Bump version for 24
juliusknorr b03835d
Fix tests
juliusknorr 363931a
Implement WebDAV lock backend
juliusknorr f61ab53
Run litmus on CI
juliusknorr 9418b4a
Make user overwrite only happen on custom locks
juliusknorr 4d3f9f2
Skip collection locking for now
juliusknorr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Implement WebDAV lock backend
Signed-off-by: Julius Härtl <[email protected]>
- Loading branch information
commit 363931a90ffcd8a7f2b6dbdb02879a268cf4b8b2
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * @copyright Copyright (c) 2022 Your name <[email protected]> | ||
| * | ||
| * @author Your name <[email protected]> | ||
| * | ||
| * @license GNU AGPL version 3 or any later version | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU Affero General Public License as | ||
| * published by the Free Software Foundation, either version 3 of the | ||
| * License, or (at your option) any later version. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU Affero General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Affero General Public License | ||
| * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| * | ||
| */ | ||
|
|
||
| namespace OCA\FilesLock\Migration; | ||
|
|
||
| use Closure; | ||
| use OCP\DB\ISchemaWrapper; | ||
| use OCP\DB\Types; | ||
| use OCP\Migration\IOutput; | ||
| use OCP\Migration\SimpleMigrationStep; | ||
|
|
||
| /** | ||
| * Auto-generated migration step: Please modify to your needs! | ||
| */ | ||
| class Version1000Date20220430180808 extends SimpleMigrationStep { | ||
|
|
||
| /** | ||
| * @param IOutput $output | ||
| * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` | ||
| * @param array $options | ||
| */ | ||
| public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void { | ||
| } | ||
|
|
||
| /** | ||
| * @param IOutput $output | ||
| * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` | ||
| * @param array $options | ||
| * @return null|ISchemaWrapper | ||
| */ | ||
| public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { | ||
| /** @var ISchemaWrapper $schema */ | ||
| $schema = $schemaClosure(); | ||
| $table = $schema->getTable('files_lock'); | ||
|
|
||
| $hasSchemaChanges = false; | ||
| if (!$table->hasColumn('owner')) { | ||
| $table->addColumn( | ||
| 'owner', Types::STRING, | ||
| [ | ||
| 'notnull' => false, | ||
| 'length' => 255, | ||
| 'default' => '' | ||
| ] | ||
| ); | ||
| $hasSchemaChanges = true; | ||
| } | ||
|
|
||
| return $hasSchemaChanges ? $schema : null; | ||
| } | ||
| } |
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.