From d306e229b5fa5a3f35ead06dbe621df37a674abb Mon Sep 17 00:00:00 2001 From: Antipkin-A Date: Thu, 27 Oct 2022 16:33:12 +0300 Subject: fixed download attribute (Fix #734 Fix #733 Fix #725 Fix #724) --- controller/editorapicontroller.php | 3 ++- controller/editorcontroller.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/controller/editorapicontroller.php b/controller/editorapicontroller.php index b8c2c7f..b7d6819 100644 --- a/controller/editorapicontroller.php +++ b/controller/editorapicontroller.php @@ -364,7 +364,8 @@ class EditorApiController extends OCSController { if (method_exists(IShare::class, "getAttributes")) { $share = empty($share) ? $fileStorage->getShare() : $share; $attributes = $share->getAttributes(); - if ($attributes !== null && !$attributes->getAttribute("permissions", "download")) { + $downloadAttr = isset($attributes) ? $attributes->getAttribute("permissions", "download") : null; + if (isset($downloadAttr) && !$downloadAttr) { $canDownload = false; } } diff --git a/controller/editorcontroller.php b/controller/editorcontroller.php index 92e7b60..55bd84e 100644 --- a/controller/editorcontroller.php +++ b/controller/editorcontroller.php @@ -1053,7 +1053,8 @@ class EditorController extends Controller { if (method_exists(IShare::class, "getAttributes")) { $share = empty($share) ? $fileStorage->getShare() : $share; $attributes = $share->getAttributes(); - if ($attributes !== null && !$attributes->getAttribute("permissions", "download")) { + $downloadAttr = isset($attributes) ? $attributes->getAttribute("permissions", "download") : null; + if (isset($downloadAttr) && !$downloadAttr) { return $this->renderError($this->trans->t("Not permitted")); } } -- cgit v1.2.3 From 1c1e0d8330c42b19faac9d0c9abf31b643f45fe4 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 1 Nov 2022 12:02:18 +0300 Subject: fix to changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95fb81f..387f3a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Change Log +## Changed +- fix download permission + ## Added - Dutch translation - Chinese (Traditional, Taiwan), Basque (Spain) empty file templates -- cgit v1.2.3 From a7b5a324cc9fc6ac219136a7071da400fd277a7d Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 1 Nov 2022 12:06:32 +0300 Subject: 7.5.8 --- CHANGELOG.md | 1 + appinfo/info.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fdaaea5..acc7967 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Change Log +## 7.5.8 ## Changed - fix download permission diff --git a/appinfo/info.xml b/appinfo/info.xml index d0efcde..79a265b 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -6,7 +6,7 @@ ONLYOFFICE connector allows you to view, edit and collaborate on text documents, spreadsheets and presentations within Nextcloud using ONLYOFFICE Docs. This will create a new Edit in ONLYOFFICE action within the document library for Office documents. This allows multiple users to co-author documents in real time from the familiar web interface and save the changes back to your file storage. apache Ascensio System SIA - 7.5.6 + 7.5.8 Onlyoffice -- cgit v1.2.3 From 3be3fc4197e98ed39e1c8c6705aff7f4e098e647 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Tue, 1 Nov 2022 12:08:51 +0300 Subject: 7.6.8 --- CHANGELOG.md | 1 + appinfo/info.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b069b20..880cfe0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Change Log +## 7.6.8 ## Changed - fix download permission diff --git a/appinfo/info.xml b/appinfo/info.xml index 53872e3..e0ae522 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -6,7 +6,7 @@ ONLYOFFICE connector allows you to view, edit and collaborate on text documents, spreadsheets and presentations within Nextcloud using ONLYOFFICE Docs. This will create a new Edit in ONLYOFFICE action within the document library for Office documents. This allows multiple users to co-author documents in real time from the familiar web interface and save the changes back to your file storage. apache Ascensio System SIA - 7.6.6 + 7.6.8 Onlyoffice -- cgit v1.2.3