Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-03-15 23:38:04 +0300
committerJulius Härtl <jus@bitgrid.net>2022-05-06 16:20:06 +0300
commit50c40f2eae523c9a9a42081fba01a06f60e787c7 (patch)
tree2d630735368ee4130b344ca7ae8d3eae2e4a7dbb
parent1adff550241fe608b204aa4c2998a04748a2fea7 (diff)
Implement support for files_lock appexperiment/lock
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r--appinfo/routes.php2
-rw-r--r--composer.lock222
-rw-r--r--lib/Controller/WopiController.php116
3 files changed, 250 insertions, 90 deletions
diff --git a/appinfo/routes.php b/appinfo/routes.php
index 56a265e9..5e358e0d 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -42,7 +42,7 @@ return [
['name' => 'wopi#checkFileInfo', 'url' => 'wopi/files/{fileId}', 'verb' => 'GET'],
['name' => 'wopi#getFile', 'url' => 'wopi/files/{fileId}/contents', 'verb' => 'GET'],
['name' => 'wopi#putFile', 'url' => 'wopi/files/{fileId}/contents', 'verb' => 'POST'],
- ['name' => 'wopi#putRelativeFile', 'url' => 'wopi/files/{fileId}', 'verb' => 'POST'],
+ ['name' => 'wopi#postFile', 'url' => 'wopi/files/{fileId}', 'verb' => 'POST'],
['name' => 'wopi#getTemplate', 'url' => 'wopi/template/{fileId}', 'verb' => 'GET'],
//settings
diff --git a/composer.lock b/composer.lock
index 17cc422f..52da2523 100644
--- a/composer.lock
+++ b/composer.lock
@@ -13,16 +13,16 @@
"source": {
"type": "git",
"url": "https://github.com/ChristophWurst/nextcloud_composer.git",
- "reference": "e59cb0a896ed593de359673a7d85f4d02406e2d9"
+ "reference": "5c5d849a8796ab3b3ab803368d6e479d0b0d443d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ChristophWurst/nextcloud_composer/zipball/e59cb0a896ed593de359673a7d85f4d02406e2d9",
- "reference": "e59cb0a896ed593de359673a7d85f4d02406e2d9",
+ "url": "https://api.github.com/repos/ChristophWurst/nextcloud_composer/zipball/5c5d849a8796ab3b3ab803368d6e479d0b0d443d",
+ "reference": "5c5d849a8796ab3b3ab803368d6e479d0b0d443d",
"shasum": ""
},
"require": {
- "php": "^7.3 || ~8.0.0",
+ "php": "^7.4 || ~8.0 || ~8.1",
"psr/container": "^1.0",
"psr/event-dispatcher": "^1.0",
"psr/log": "^1.1"
@@ -31,7 +31,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "24.0.0-dev"
+ "dev-master": "25.0.0-dev"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -49,7 +49,7 @@
"issues": "https://github.com/ChristophWurst/nextcloud_composer/issues",
"source": "https://github.com/ChristophWurst/nextcloud_composer/tree/master"
},
- "time": "2021-12-21T01:14:58+00:00"
+ "time": "2022-05-06T01:53:16+00:00"
},
{
"name": "jakub-onderka/php-parallel-lint",
@@ -106,16 +106,16 @@
},
{
"name": "psalm/phar",
- "version": "4.22.0",
+ "version": "4.23.0",
"source": {
"type": "git",
"url": "https://github.com/psalm/phar.git",
- "reference": "feebed09c9782d9aaa819b794d880c2671ba0e4c"
+ "reference": "92700588da7c19107e4c465641ef10ac1a30e105"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/psalm/phar/zipball/feebed09c9782d9aaa819b794d880c2671ba0e4c",
- "reference": "feebed09c9782d9aaa819b794d880c2671ba0e4c",
+ "url": "https://api.github.com/repos/psalm/phar/zipball/92700588da7c19107e4c465641ef10ac1a30e105",
+ "reference": "92700588da7c19107e4c465641ef10ac1a30e105",
"shasum": ""
},
"require": {
@@ -135,26 +135,26 @@
"description": "Composer-based Psalm Phar",
"support": {
"issues": "https://github.com/psalm/phar/issues",
- "source": "https://github.com/psalm/phar/tree/4.22.0"
+ "source": "https://github.com/psalm/phar/tree/4.23.0"
},
- "time": "2022-02-27T11:01:37+00:00"
+ "time": "2022-05-02T02:15:17+00:00"
},
{
"name": "psr/container",
- "version": "1.1.1",
+ "version": "1.1.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
- "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
+ "reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
- "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
+ "reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
"shasum": ""
},
"require": {
- "php": ">=7.2.0"
+ "php": ">=7.4.0"
},
"type": "library",
"autoload": {
@@ -183,9 +183,9 @@
],
"support": {
"issues": "https://github.com/php-fig/container/issues",
- "source": "https://github.com/php-fig/container/tree/1.1.1"
+ "source": "https://github.com/php-fig/container/tree/1.1.2"
},
- "time": "2021-03-05T17:36:06+00:00"
+ "time": "2021-11-05T16:50:12+00:00"
},
{
"name": "psr/event-dispatcher",
@@ -293,40 +293,49 @@
"source": {
"type": "git",
"url": "https://github.com/Roave/SecurityAdvisories.git",
- "reference": "fff53639bf1fa25f311c3e54932ac8c827f9a343"
+ "reference": "2658dd564ed1a63989404083d7ccb9cb10e07701"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/fff53639bf1fa25f311c3e54932ac8c827f9a343",
- "reference": "fff53639bf1fa25f311c3e54932ac8c827f9a343",
+ "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/2658dd564ed1a63989404083d7ccb9cb10e07701",
+ "reference": "2658dd564ed1a63989404083d7ccb9cb10e07701",
"shasum": ""
},
"conflict": {
"3f/pygmentize": "<1.2",
- "adodb/adodb-php": "<5.20.12",
+ "admidio/admidio": "<4.1.9",
+ "adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3",
"akaunting/akaunting": "<2.1.13",
+ "alextselegidis/easyappointments": "<1.4.3",
"alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1",
"amazing/media2click": ">=1,<1.3.3",
"amphp/artax": "<1.0.6|>=2,<2.0.6",
"amphp/http": "<1.0.1",
"amphp/http-client": ">=4,<4.4",
+ "anchorcms/anchor-cms": "<=0.12.7",
+ "andreapollastri/cipi": "<=3.1.15",
"api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6",
+ "appwrite/server-ce": "<0.11.1|>=0.12,<0.12.2",
"area17/twill": "<1.2.5|>=2,<2.5.3",
"asymmetricrypt/asymmetricrypt": ">=0,<9.9.99",
"aws/aws-sdk-php": ">=3,<3.2.1",
"bagisto/bagisto": "<0.1.5",
"barrelstrength/sprout-base-email": "<1.2.7",
"barrelstrength/sprout-forms": "<3.9",
+ "barryvdh/laravel-translation-manager": "<0.6.2",
"baserproject/basercms": "<4.5.4",
"billz/raspap-webgui": "<=2.6.6",
"bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3",
+ "bmarshall511/wordpress_zero_spam": "<5.2.13",
"bolt/bolt": "<3.7.2",
- "bolt/core": "<4.1.13",
+ "bolt/core": "<=4.2",
+ "bottelet/flarepoint": "<2.2.1",
"brightlocal/phpwhois": "<=4.2.5",
"buddypress/buddypress": "<7.2.1",
"bugsnag/bugsnag-laravel": ">=2,<2.0.2",
+ "bytefury/crater": "<6.0.2",
"cachethq/cachet": "<2.5.1",
- "cakephp/cakephp": ">=1.3,<1.3.18|>=2,<2.4.99|>=2.5,<2.5.99|>=2.6,<2.6.12|>=2.7,<2.7.6|>=3,<3.5.18|>=3.6,<3.6.15|>=3.7,<3.7.7",
+ "cakephp/cakephp": "<4.0.6",
"cardgate/magento2": "<2.0.33",
"cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4",
"cartalyst/sentry": "<=2.1.6",
@@ -335,16 +344,21 @@
"cesnet/simplesamlphp-module-proxystatistics": "<3.1",
"codeception/codeception": "<3.1.3|>=4,<4.1.22",
"codeigniter/framework": "<=3.0.6",
+ "codeigniter4/framework": "<4.1.9",
"codiad/codiad": "<=2.8.4",
- "composer/composer": "<1.10.23|>=2-alpha.1,<2.1.9",
- "concrete5/concrete5": "<8.5.5",
+ "composer/composer": "<1.10.26|>=2-alpha.1,<2.2.12|>=2.3,<2.3.5",
+ "concrete5/concrete5": "<9",
"concrete5/core": "<8.5.7",
"contao-components/mediaelement": ">=2.14.2,<2.21.1",
"contao/core": ">=2,<3.5.39",
- "contao/core-bundle": ">=4,<4.4.56|>=4.5,<4.9.18|>=4.10,<4.11.7|= 4.10.0",
+ "contao/core-bundle": "<4.9.18|>=4.10,<4.11.7|= 4.10.0",
"contao/listing-bundle": ">=4,<4.4.8",
- "craftcms/cms": "<3.7.14",
+ "contao/managed-edition": "<=1.5",
+ "craftcms/cms": "<3.7.29",
"croogo/croogo": "<3.0.7",
+ "cuyz/valinor": ">=0.5,<0.7",
+ "czproject/git-php": "<4.0.3",
+ "darylldoyle/safe-svg": "<1.9.10",
"datadog/dd-trace": ">=0.30,<0.30.2",
"david-garcia/phpwhois": "<=4.3.1",
"derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1",
@@ -358,15 +372,16 @@
"doctrine/mongodb-odm": ">=1,<1.0.2",
"doctrine/mongodb-odm-bundle": ">=2,<3.0.1",
"doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4",
- "dolibarr/dolibarr": "<14|>= 3.3.beta1, < 13.0.2",
- "dompdf/dompdf": ">=0.6,<0.6.2",
- "drupal/core": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4",
+ "dolibarr/dolibarr": "<16|>= 3.3.beta1, < 13.0.2",
+ "dompdf/dompdf": "<1.2.1",
+ "drupal/core": ">=7,<7.88|>=8,<9.2.13|>=9.3,<9.3.6",
"drupal/drupal": ">=7,<7.80|>=8,<8.9.16|>=9,<9.1.12|>=9.2,<9.2.4",
"dweeves/magmi": "<=0.7.24",
"ecodev/newsletter": "<=4",
- "elgg/elgg": "<3.3.23|>=4,<4.0.5",
+ "ectouch/ectouch": "<=2.7.2",
+ "elgg/elgg": "<3.3.24|>=4,<4.0.5",
"endroid/qr-code-bundle": "<3.4.2",
- "enshrined/svg-sanitize": "<0.13.1",
+ "enshrined/svg-sanitize": "<0.15",
"erusev/parsedown": "<1.7.2",
"ether/logs": "<3.0.4",
"ezsystems/demobundle": ">=5.4,<5.4.6.1",
@@ -374,27 +389,29 @@
"ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1",
"ezsystems/ezfind-ls": ">=5.3,<5.3.6.1|>=5.4,<5.4.11.1|>=2017.12,<2017.12.0.1",
"ezsystems/ezplatform": "<=1.13.6|>=2,<=2.5.24",
- "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<=1.5.25",
+ "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6|>=1.5,<1.5.27",
"ezsystems/ezplatform-admin-ui-assets": ">=4,<4.2.1|>=5,<5.0.1|>=5.1,<5.1.1",
- "ezsystems/ezplatform-kernel": "<=1.2.5|>=1.3,<=1.3.1",
+ "ezsystems/ezplatform-kernel": "<=1.2.5|>=1.3,<1.3.17",
"ezsystems/ezplatform-rest": ">=1.2,<=1.2.2|>=1.3,<1.3.8",
"ezsystems/ezplatform-richtext": ">=2.3,<=2.3.7",
"ezsystems/ezplatform-user": ">=1,<1.0.1",
- "ezsystems/ezpublish-kernel": "<=6.13.8.1|>=7,<=7.5.15.1",
+ "ezsystems/ezpublish-kernel": "<=6.13.8.1|>=7,<7.5.28",
"ezsystems/ezpublish-legacy": "<=2017.12.7.3|>=2018.6,<=2019.3.5.1",
"ezsystems/platform-ui-assets-bundle": ">=4.2,<4.2.3",
"ezsystems/repository-forms": ">=2.3,<2.3.2.1",
"ezyang/htmlpurifier": "<4.1.1",
"facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2",
+ "facturascripts/facturascripts": "<2022.6",
"feehi/cms": "<=2.1.1",
"feehi/feehicms": "<=0.1.3",
+ "fenom/fenom": "<=2.12.1",
"firebase/php-jwt": "<2",
"flarum/core": ">=1,<=1.0.1",
"flarum/sticky": ">=0.1-beta.14,<=0.1-beta.15",
"flarum/tags": "<=0.1-beta.13",
"fluidtypo3/vhs": "<5.1.1",
"fooman/tcpdf": "<6.2.22",
- "forkcms/forkcms": "<=5.9.2",
+ "forkcms/forkcms": "<5.11.1",
"fossar/tcpdf-parser": "<6.2.22",
"francoisjacquet/rosariosis": "<8.1.1",
"friendsofsymfony/oauth2-php": "<1.3",
@@ -402,35 +419,47 @@
"friendsofsymfony/user-bundle": ">=1.2,<1.3.5",
"friendsoftypo3/mediace": ">=7.6.2,<7.6.5",
"froala/wysiwyg-editor": "<3.2.7",
+ "froxlor/froxlor": "<=0.10.22",
"fuel/core": "<1.8.1",
- "getgrav/grav": "<=1.7.24",
+ "gaoming13/wechat-php-sdk": "<=1.10.2",
+ "genix/cms": "<=1.1.11",
+ "getgrav/grav": "<1.7.31",
"getkirby/cms": "<3.5.8",
"getkirby/panel": "<2.5.14",
"gilacms/gila": "<=1.11.4",
"globalpayments/php-sdk": "<2",
+ "google/protobuf": "<3.15",
"gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3",
"gree/jose": "<=2.2",
"gregwar/rst": "<1.0.3",
"grumpydictator/firefly-iii": "<5.6.5",
"guzzlehttp/guzzle": ">=4-rc.2,<4.2.4|>=5,<5.3.1|>=6,<6.2.1",
+ "guzzlehttp/psr7": "<1.8.4|>=2,<2.1.1",
"helloxz/imgurl": "<=2.31",
+ "hillelcoren/invoice-ninja": "<5.3.35",
"hjue/justwriting": "<=1",
"hov/jobfair": "<1.0.13|>=2,<2.0.2",
+ "hyn/multi-tenant": ">=5.6,<5.7.2",
+ "ibexa/core": ">=4,<4.0.5|>=4.1,<4.1.2",
"ibexa/post-install": "<=1.0.4",
- "icecoder/icecoder": "<=8",
+ "icecoder/icecoder": "<=8.1",
"illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10",
"illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.99999|>=4.2,<=4.2.99999|>=5,<=5.0.99999|>=5.1,<=5.1.99999|>=5.2,<=5.2.99999|>=5.3,<=5.3.99999|>=5.4,<=5.4.99999|>=5.5,<=5.5.49|>=5.6,<=5.6.99999|>=5.7,<=5.7.99999|>=5.8,<=5.8.99999|>=6,<6.18.31|>=7,<7.22.4",
"illuminate/database": "<6.20.26|>=7,<7.30.5|>=8,<8.40",
"illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15",
"illuminate/view": "<6.20.42|>=7,<7.30.6|>=8,<8.75",
- "impresscms/impresscms": "<=1.4.2",
+ "impresscms/impresscms": "<=1.4.3",
"in2code/femanager": "<5.5.1|>=6,<6.3.1",
"intelliants/subrion": "<=4.2.1",
"ivankristianto/phpwhois": "<=4.3",
"jackalope/jackalope-doctrine-dbal": "<1.7.4",
"james-heinrich/getid3": "<1.9.21",
- "joomla/archive": "<1.1.10",
+ "joomla/archive": "<1.1.12|>=2,<2.0.1",
+ "joomla/filesystem": "<1.6.2|>=2,<2.0.1",
+ "joomla/filter": "<1.4.4|>=2,<2.0.1",
+ "joomla/input": ">=2,<2.0.2",
"joomla/session": "<1.3.1",
+ "jsdecena/laracom": "<2.0.9",
"jsmitty12/phpwhois": "<5.1",
"kazist/phpwhois": "<=4.2.6",
"kevinpapst/kimai2": "<1.16.7",
@@ -438,57 +467,68 @@
"klaviyo/magento2-extension": ">=1,<3",
"kreait/firebase-php": ">=3.2,<3.8.1",
"la-haute-societe/tcpdf": "<6.2.22",
+ "laminas/laminas-form": "<2.17.1|>=3,<3.0.2|>=3.1,<3.1.1",
"laminas/laminas-http": "<2.14.2",
+ "laravel/fortify": "<1.11.1",
"laravel/framework": "<6.20.42|>=7,<7.30.6|>=8,<8.75",
+ "laravel/laravel": "<=5.8.38",
"laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10",
+ "latte/latte": "<2.10.8",
"lavalite/cms": "<=5.8",
"lcobucci/jwt": ">=3.4,<3.4.6|>=4,<4.0.4|>=4.1,<4.1.5",
"league/commonmark": "<0.18.3",
"league/flysystem": "<1.1.4|>=2,<2.1.1",
"lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3",
- "librenms/librenms": "<=21.11",
+ "librenms/librenms": "<22.2.2",
"limesurvey/limesurvey": "<3.27.19",
+ "livehelperchat/livehelperchat": "<=3.91",
"livewire/livewire": ">2.2.4,<2.2.6",
"lms/routes": "<2.1.1",
"localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2",
+ "luyadev/yii-helpers": "<1.2.1",
"magento/community-edition": ">=2,<2.2.10|>=2.3,<2.3.3",
"magento/magento1ce": "<1.9.4.3",
"magento/magento1ee": ">=1,<1.14.4.3",
"magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2-p.2",
"marcwillmann/turn": "<0.3.3",
- "mautic/core": "<4|= 2.13.1",
+ "matyhtf/framework": "<3.0.6",
+ "mautic/core": "<4.2|= 2.13.1",
"mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35",
- "microweber/microweber": "<1.2.8",
+ "microweber/microweber": "<1.3",
"miniorange/miniorange-saml": "<1.4.3",
"mittwald/typo3_forum": "<1.2.1",
- "modx/revolution": "<2.8",
+ "modx/revolution": "<= 2.8.3-pl|<2.8",
"monolog/monolog": ">=1.8,<1.12",
- "moodle/moodle": "<3.5.17|>=3.7,<3.7.9|>=3.8,<3.8.8|>=3.9,<3.9.5|>=3.10-beta,<3.10.2",
+ "moodle/moodle": "<3.9.13|>=3.10-beta,<3.10.10|>=3.11,<3.11.6",
+ "mustache/mustache": ">=2,<2.14.1",
"namshi/jose": "<2.2",
"neoan3-apps/template": "<1.1.1",
+ "neorazorx/facturascripts": "<2022.4",
"neos/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6",
"neos/form": ">=1.2,<4.3.3|>=5,<5.0.9|>=5.1,<5.1.3",
"neos/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.9.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3",
"neos/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5",
+ "netgen/tagsbundle": ">=3.4,<3.4.11|>=4,<4.0.15",
"nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6",
"nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13",
"nilsteampassnet/teampass": "<=2.1.27.36",
"nukeviet/nukeviet": "<4.3.4",
- "nystudio107/craft-seomatic": "<3.3",
+ "nystudio107/craft-seomatic": "<3.4.12",
"nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1",
"october/backend": "<1.1.2",
"october/cms": "= 1.1.1|= 1.0.471|= 1.0.469|>=1.0.319,<1.0.469",
"october/october": ">=1.0.319,<1.0.466|>=2.1,<2.1.12",
"october/rain": "<1.0.472|>=1.1,<1.1.2",
- "october/system": "<1.0.472|>=1.1.1,<1.1.5|>=2.1,<2.1.12",
+ "october/system": "<1.0.475|>=1.1,<1.1.11|>=2,<2.1.27",
"onelogin/php-saml": "<2.10.4",
"oneup/uploader-bundle": "<1.9.3|>=2,<2.1.5",
+ "open-web-analytics/open-web-analytics": "<1.7.4",
"opencart/opencart": "<=3.0.3.2",
"openid/php-openid": "<2.3",
"openmage/magento-lts": "<19.4.15|>=20,<20.0.13",
"orchid/platform": ">=9,<9.4.4",
"oro/crm": ">=1.7,<1.7.4|>=3.1,<4.1.17|>=4.2,<4.2.7",
- "oro/platform": ">=1.7,<1.7.4",
+ "oro/platform": ">=1.7,<1.7.4|>=3.1,<3.1.29|>=4.1,<4.1.17|>=4.2,<4.2.8",
"padraic/humbug_get_contents": "<1.1.2",
"pagarme/pagarme-php": ">=0,<3",
"pagekit/pagekit": "<=1.0.18",
@@ -496,58 +536,65 @@
"passbolt/passbolt_api": "<2.11",
"paypal/merchant-sdk-php": "<3.12",
"pear/archive_tar": "<1.4.14",
+ "pear/crypt_gpg": "<1.6.7",
"pegasus/google-for-jobs": "<1.5.1|>=2,<2.1.1",
"personnummer/personnummer": "<3.0.2",
"phanan/koel": "<5.1.4",
"phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7",
"phpmailer/phpmailer": "<6.5",
"phpmussel/phpmussel": ">=1,<1.6",
- "phpmyadmin/phpmyadmin": "<4.9.6|>=5,<5.0.3",
- "phpoffice/phpexcel": "<1.8.2",
+ "phpmyadmin/phpmyadmin": "<5.1.3",
+ "phpoffice/phpexcel": "<1.8",
"phpoffice/phpspreadsheet": "<1.16",
"phpseclib/phpseclib": "<2.0.31|>=3,<3.0.7",
"phpservermon/phpservermon": "<=3.5.2",
- "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3",
+ "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5,<5.6.3",
"phpwhois/phpwhois": "<=4.2.5",
"phpxmlrpc/extras": "<0.6.1",
- "pimcore/pimcore": "<10.2.6",
- "pocketmine/pocketmine-mp": "<4.0.3",
+ "pimcore/data-hub": "<1.2.4",
+ "pimcore/pimcore": "<10.4",
+ "pocketmine/bedrock-protocol": "<8.0.2",
+ "pocketmine/pocketmine-mp": "<4.2.9",
"pressbooks/pressbooks": "<5.18",
"prestashop/autoupgrade": ">=4,<4.10.1",
"prestashop/contactform": ">1.0.1,<4.3",
"prestashop/gamification": "<2.3.2",
- "prestashop/prestashop": ">=1.7.5,<=1.7.8.1",
+ "prestashop/prestashop": ">=1.7,<=1.7.8.2",
"prestashop/productcomments": ">=4,<4.2.1",
"prestashop/ps_emailsubscription": "<2.6.1",
"prestashop/ps_facetedsearch": "<3.4.1",
"prestashop/ps_linklist": "<3.1",
- "privatebin/privatebin": "<1.2.2|>=1.3,<1.3.2",
+ "privatebin/privatebin": "<1.4",
"propel/propel": ">=2-alpha.1,<=2-alpha.7",
"propel/propel1": ">=1,<=1.7.1",
- "pterodactyl/panel": "<1.6.6",
+ "pterodactyl/panel": "<1.7",
+ "ptrofimov/beanstalk_console": "<1.7.14",
"pusher/pusher-php-server": "<2.2.1",
"pwweb/laravel-core": "<=0.3.6-beta",
"rainlab/debugbar-plugin": "<3.1",
- "remdex/livehelperchat": "<=3.90",
+ "remdex/livehelperchat": "<3.99",
"rmccue/requests": ">=1.6,<1.8",
"robrichards/xmlseclibs": "<3.0.4",
+ "rudloff/alltube": "<3.0.3",
+ "s-cart/s-cart": "<6.7.2",
"sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1",
"sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9",
"scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11",
"sensiolabs/connect": "<4.2.3",
"serluck/phpwhois": "<=4.2.6",
- "shopware/core": "<=6.4.6",
- "shopware/platform": "<=6.4.6",
+ "shopware/core": "<=6.4.9",
+ "shopware/platform": "<=6.4.9",
"shopware/production": "<=6.3.5.2",
- "shopware/shopware": "<5.7.6",
- "showdoc/showdoc": "<=2.9.13",
- "silverstripe/admin": "<4.8.1",
+ "shopware/shopware": "<5.7.9",
+ "shopware/storefront": "<=6.4.8.1",
+ "showdoc/showdoc": "<2.10.4",
+ "silverstripe/admin": ">=1,<1.8.1",
"silverstripe/assets": ">=1,<1.4.7|>=1.5,<1.5.2",
"silverstripe/cms": "<4.3.6|>=4.4,<4.4.4",
"silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1",
"silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3",
- "silverstripe/framework": "<4.7.4",
- "silverstripe/graphql": "<3.5.2|>=4-alpha.1,<4-alpha.2",
+ "silverstripe/framework": "<4.10.1",
+ "silverstripe/graphql": "<3.5.2|>=4-alpha.1,<4-alpha.2|= 4.0.0-alpha1",
"silverstripe/registry": ">=2.1,<2.1.2|>=2.2,<2.2.1",
"silverstripe/restfulserver": ">=1,<1.0.9|>=2,<2.0.4",
"silverstripe/subsites": ">=2,<2.1.1",
@@ -559,13 +606,15 @@
"simplesamlphp/simplesamlphp-module-infocard": "<1.0.1",
"simplito/elliptic-php": "<1.0.6",
"slim/slim": "<2.6",
- "smarty/smarty": "<3.1.39",
- "snipe/snipe-it": "<5.3.5",
+ "smarty/smarty": "<3.1.43|>=4,<4.0.3",
+ "snipe/snipe-it": "<5.4.3|>= 6.0.0-RC-1, <= 6.0.0-RC-5",
"socalnick/scn-social-auth": "<1.15.2",
"socialiteproviders/steam": "<1.1",
+ "spipu/html2pdf": "<5.2.4",
"spoonity/tcpdf": "<6.2.22",
"squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1",
- "ssddanbrown/bookstack": "<21.11.3",
+ "ssddanbrown/bookstack": "<22.2.3",
+ "statamic/cms": "<3.2.39|>=3.3,<3.3.2",
"stormpath/sdk": ">=0,<9.9.99",
"studio-42/elfinder": "<2.1.59",
"subrion/cms": "<=4.2.1",
@@ -573,10 +622,10 @@
"swiftmailer/swiftmailer": ">=4,<5.4.5",
"sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2",
"sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1",
- "sylius/grid-bundle": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1",
+ "sylius/grid-bundle": "<1.10.1",
"sylius/paypal-plugin": ">=1,<1.2.4|>=1.3,<1.3.1",
"sylius/resource-bundle": "<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4",
- "sylius/sylius": "<1.6.9|>=1.7,<1.7.9|>=1.8,<1.8.3|>=1.9,<1.9.5",
+ "sylius/sylius": "<1.9.10|>=1.10,<1.10.11|>=1.11,<1.11.2",
"symbiote/silverstripe-multivaluefield": ">=3,<3.0.99",
"symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4",
"symbiote/silverstripe-versionedfiles": "<=2.0.3",
@@ -585,7 +634,7 @@
"symfony/dependency-injection": ">=2,<2.0.17|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7",
"symfony/error-handler": ">=4.4,<4.4.4|>=5,<5.0.4",
"symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1",
- "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7",
+ "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7|>=5.3.14,<=5.3.14|>=5.4.3,<=5.4.3|>=6.0.3,<=6.0.3|= 6.0.3|= 5.4.3|= 5.3.14",
"symfony/http-foundation": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7",
"symfony/http-kernel": ">=2,<2.8.52|>=3,<3.4.35|>=4,<4.2.12|>=4.3,<4.4.13|>=5,<5.1.5|>=5.2,<5.3.12",
"symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13",
@@ -601,9 +650,9 @@
"symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.9",
"symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11",
"symfony/security-guard": ">=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8",
- "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8|>=5.3,<5.3.2",
+ "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7|>=5.1,<5.2.8|>=5.3,<5.3.2",
"symfony/serializer": ">=2,<2.0.11|>=4.1,<4.4.35|>=5,<5.3.12",
- "symfony/symfony": ">=2,<3.4.49|>=4,<4.4.35|>=5,<5.3.12",
+ "symfony/symfony": ">=2,<3.4.49|>=4,<4.4.35|>=5,<5.3.12|>=5.3.14,<=5.3.14|>=5.4.3,<=5.4.3|>=6.0.3,<=6.0.3",
"symfony/translation": ">=2,<2.0.17",
"symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3",
"symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8",
@@ -611,7 +660,9 @@
"symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7",
"t3/dce": ">=2.2,<2.6.2",
"t3g/svg-sanitizer": "<1.0.3",
+ "tastyigniter/tastyigniter": "<3.3",
"tecnickcom/tcpdf": "<6.2.22",
+ "terminal42/contao-tablelookupwizard": "<3.3.5",
"thelia/backoffice-default-template": ">=2.1,<2.1.2",
"thelia/thelia": ">=2.1-beta.1,<2.1.3",
"theonedemon/phpwhois": "<=4.2.5",
@@ -620,9 +671,9 @@
"topthink/framework": "<6.0.9",
"topthink/think": "<=6.0.9",
"topthink/thinkphp": "<=3.2.3",
- "tribalsystems/zenario": "<8.8.53370",
+ "tribalsystems/zenario": "<9.2.55826",
"truckersmp/phpwhois": "<=4.3.1",
- "twig/twig": "<1.38|>=2,<2.7",
+ "twig/twig": "<1.38|>=2,<2.14.11|>=3,<3.3.8",
"typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.5",
"typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1",
"typo3/cms-core": ">=6.2,<=6.2.56|>=7,<=7.6.52|>=8,<=8.7.41|>=9,<9.5.29|>=10,<10.4.19|>=11,<11.5",
@@ -633,10 +684,12 @@
"typo3/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5",
"typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10",
"ua-parser/uap-php": "<3.8",
+ "unisharp/laravel-filemanager": "<=2.3",
+ "userfrosting/userfrosting": ">=0.3.1,<4.6.3",
"usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2",
"vanilla/safecurl": "<0.9.2",
"verot/class.upload.php": "<=1.0.3|>=2,<=2.0.4",
- "vrana/adminer": "<4.7.9",
+ "vrana/adminer": "<4.8.1",
"wallabag/tcpdf": "<6.2.22",
"wanglelecc/laracms": "<=1.0.3",
"web-auth/webauthn-framework": ">=3.3,<3.3.4",
@@ -644,6 +697,9 @@
"wikimedia/parsoid": "<0.12.2",
"willdurand/js-translation-bundle": "<2.1.1",
"wp-cli/wp-cli": "<2.5",
+ "wpanel/wpanel4-cms": "<=4.3.1",
+ "wwbn/avideo": "<=11.6",
+ "yeswiki/yeswiki": "<4.1",
"yetiforce/yetiforce-crm": "<=6.3",
"yidashi/yii2cmf": "<=2",
"yii2mod/yii2-cms": "<1.9.2",
@@ -663,10 +719,10 @@
"zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2",
"zendframework/zend-db": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.10|>=2.3,<2.3.5",
"zendframework/zend-developer-tools": ">=1.2.2,<1.2.3",
- "zendframework/zend-diactoros": ">=1,<1.8.4",
- "zendframework/zend-feed": ">=1,<2.10.3",
+ "zendframework/zend-diactoros": "<1.8.4",
+ "zendframework/zend-feed": "<2.10.3",
"zendframework/zend-form": ">=2,<2.2.7|>=2.3,<2.3.1",
- "zendframework/zend-http": ">=1,<2.8.1",
+ "zendframework/zend-http": "<2.8.1",
"zendframework/zend-json": ">=2.1,<2.1.6|>=2.2,<2.2.6",
"zendframework/zend-ldap": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.8|>=2.3,<2.3.3",
"zendframework/zend-mail": ">=2,<2.4.11|>=2.5,<2.7.2",
@@ -717,7 +773,7 @@
"type": "tidelift"
}
],
- "time": "2021-12-17T20:13:17+00:00"
+ "time": "2022-05-05T14:08:42+00:00"
}
],
"aliases": [],
@@ -731,7 +787,7 @@
"platform": [],
"platform-dev": [],
"platform-overrides": {
- "php": "7.3"
+ "php": "7.4"
},
- "plugin-api-version": "2.2.0"
+ "plugin-api-version": "2.3.0"
}
diff --git a/lib/Controller/WopiController.php b/lib/Controller/WopiController.php
index 7d57da67..a1063b03 100644
--- a/lib/Controller/WopiController.php
+++ b/lib/Controller/WopiController.php
@@ -23,6 +23,7 @@ namespace OCA\Richdocuments\Controller;
use OCA\Files_Versions\Versions\IVersionManager;
use OCA\Richdocuments\AppConfig;
+use OCA\Richdocuments\AppInfo\Application;
use OCA\Richdocuments\Db\Wopi;
use OCA\Richdocuments\Db\WopiMapper;
use OCA\Richdocuments\Exceptions\ExpiredTokenException;
@@ -44,6 +45,11 @@ use OCP\Files\Folder;
use OCP\Files\GenericFileException;
use OCP\Files\InvalidPathException;
use OCP\Files\IRootFolder;
+use OCP\Files\Lock\ILock;
+use OCP\Files\Lock\ILockManager;
+use OCP\Files\Lock\LockContext;
+use OCP\Files\Lock\NoLockProviderException;
+use OCP\Files\Lock\OwnerLockedException;
use OCP\Files\Node;
use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
@@ -54,6 +60,7 @@ use OCP\IRequest;
use OCP\IURLGenerator;
use OCP\IUserManager;
use OCP\Lock\LockedException;
+use OCP\PreConditionNotMetException;
use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IManager as IShareManager;
use Psr\Container\ContainerExceptionInterface;
@@ -88,6 +95,7 @@ class WopiController extends Controller {
private $encryptionManager;
/** @var IGroupManager */
private $groupManager;
+ private ILockManager $lockManager;
// Signifies LOOL that document has been changed externally in this storage
const LOOL_STATUS_DOC_CHANGED = 1010;
@@ -128,7 +136,8 @@ class WopiController extends Controller {
UserScopeService $userScopeService,
FederationService $federationService,
IEncryptionManager $encryptionManager,
- IGroupManager $groupManager
+ IGroupManager $groupManager,
+ ILockManager $lockManager
) {
parent::__construct($appName, $request);
$this->rootFolder = $rootFolder;
@@ -145,6 +154,7 @@ class WopiController extends Controller {
$this->federationService = $federationService;
$this->encryptionManager = $encryptionManager;
$this->groupManager = $groupManager;
+ $this->lockManager = $lockManager;
}
/**
@@ -217,6 +227,7 @@ class WopiController extends Controller {
'HideExportOption' => $wopi->getHideDownload(),
'HidePrintOption' => $wopi->getHideDownload(),
'DownloadAsPostMessage' => $wopi->getDirect(),
+ 'SupportsLocks' => $this->lockManager->isLockProviderAvailable(),
];
if ($wopi->hasTemplateId()) {
@@ -535,7 +546,7 @@ class WopiController extends Controller {
$content = fopen('php://input', 'rb');
try {
- $this->retryOperation(function () use ($file, $content){
+ $this->wrappedFilesystemOperation($wopi, function () use ($file, $content){
return $file->putContent($content);
});
} catch (LockedException $e) {
@@ -580,9 +591,11 @@ class WopiController extends Controller {
* @return JSONResponse
* @throws DoesNotExistException
*/
- public function putRelativeFile($fileId,
- $access_token) {
+ public function postFile(string $fileId, string $access_token): JSONResponse {
try {
+ $wopiOverride = $this->request->getHeader('X-WOPI-Override');
+ $wopiLock = $this->request->getHeader('X-WOPI-Lock');
+ list($fileId, ,) = Helper::parseFileId($fileId);
$wopi = $this->wopiMapper->getWopiForToken($access_token);
} catch (UnknownTokenException $e) {
$this->logger->debug($e->getMessage(), ['app' => 'richdocuments']);
@@ -595,7 +608,22 @@ class WopiController extends Controller {
return new JSONResponse([], Http::STATUS_FORBIDDEN);
}
- list($fileId, ,) = Helper::parseFileId($fileId);
+ switch ($wopiOverride) {
+ case 'LOCK':
+ return $this->lock($wopi, $wopiLock);
+ case 'UNLOCK':
+ return $this->unlock($wopi, $wopiLock);
+ case 'REFRESH_LOCK':
+ return $this->refreshLock($wopi, $wopiLock);
+ case 'GET_LOCK':
+ return $this->getLock($wopi, $wopiLock);
+ case 'RENAME_FILE':
+ break; //FIXME: Move to function
+ default:
+ break; //FIXME: Move to function and add error for unsupported method
+ }
+
+
$isRenameFile = ($this->request->getHeader('X-WOPI-Override') === 'RENAME_FILE');
if (!$wopi->getCanwrite()) {
@@ -690,7 +718,7 @@ class WopiController extends Controller {
$this->userScopeService->setFilesystemScope($wopi->getEditorUid());
try {
- $this->retryOperation(function () use ($file, $content){
+ $this->wrappedFilesystemOperation($wopi, function () use ($file, $content){
return $file->putContent($content);
});
} catch (LockedException $e) {
@@ -711,6 +739,82 @@ class WopiController extends Controller {
}
}
+ private function lock(Wopi $wopi, string $lock): JSONResponse {
+ try {
+ $lock = $this->lockManager->lock(new LockContext(
+ $this->getFileForWopiToken($wopi),
+ ILock::TYPE_APP,
+ Application::APPNAME
+ ));
+ return new JSONResponse();
+ } catch (NoLockProviderException|PreConditionNotMetException $e) {
+ return new JSONResponse([], Http::STATUS_BAD_REQUEST);
+ } catch (OwnerLockedException $e) {
+ return new JSONResponse([], Http::STATUS_LOCKED);
+ } catch (\Exception $e) {
+ return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
+ }
+ }
+ private function unlock(Wopi $wopi, string $lock): JSONResponse {
+ try {
+ $this->lockManager->unlock(new LockContext(
+ $this->getFileForWopiToken($wopi),
+ ILock::TYPE_APP,
+ Application::APPNAME
+ ));
+ return new JSONResponse();
+ } catch (NoLockProviderException|PreConditionNotMetException $e) {
+ return new JSONResponse([], Http::STATUS_BAD_REQUEST);
+ } catch (\Exception $e) {
+ return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
+ }
+ }
+
+ private function refreshLock(Wopi $wopi, string $lock): JSONResponse {
+ try {
+ $lock = $this->lockManager->lock(new LockContext(
+ $this->getFileForWopiToken($wopi),
+ ILock::TYPE_APP,
+ Application::APPNAME
+ ));
+ return new JSONResponse();
+ } catch (NoLockProviderException|PreConditionNotMetException $e) {
+ return new JSONResponse([], Http::STATUS_BAD_REQUEST);
+ } catch (OwnerLockedException $e) {
+ return new JSONResponse([], Http::STATUS_LOCKED);
+ } catch (\Exception $e) {
+ return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
+ }
+ }
+
+ private function getLock(Wopi $wopi, string $lock): JSONResponse {
+ $locks = $this->lockManager->getLocks($wopi->getFileid());
+ return new JSONResponse();
+ }
+
+ /**
+ * @throws NotFoundException
+ * @throws GenericFileException
+ * @throws LockedException
+ * @throws ShareNotFound
+ */
+ protected function wrappedFilesystemOperation(Wopi $wopi, callable $filesystemOperation): void {
+ $retryOperation = function () use ($filesystemOperation) {
+ $this->retryOperation(function () use ($filesystemOperation) {
+ $filesystemOperation();
+ });
+ };
+ try {
+ $this->lockManager->runInScope(new LockContext(
+ $this->getFileForWopiToken($wopi),
+ ILock::TYPE_APP,
+ Application::APPNAME
+ ), $retryOperation);
+ } catch (NoLockProviderException $e) {
+ $retryOperation();
+ }
+ }
+
/**
* Retry operation if a LockedException occurred
* Other exceptions will still be thrown