diff options
author | Sergey Linnik <sergey.linnik@onlyoffice.com> | 2022-11-01 16:26:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-01 16:26:01 +0300 |
commit | 56319197e3e3eed302d1d3105278047a086dd5a8 (patch) | |
tree | 70d028984bdadb3d5276f46f3ac1887438ac731c | |
parent | d42086c6fcc4edc60d2518d5c3d21d44e26f3d20 (diff) | |
parent | 3be3fc4197e98ed39e1c8c6705aff7f4e098e647 (diff) |
Merge pull request #738 from ONLYOFFICE/feature/nc-25v7.6.8
Release/7.6.8
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | appinfo/info.xml | 2 | ||||
-rw-r--r-- | controller/editorapicontroller.php | 3 | ||||
-rw-r--r-- | controller/editorcontroller.php | 3 |
4 files changed, 9 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index fa4b1df..880cfe0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 7.6.8 +## Changed +- fix download permission + ## 7.6.6 ## Added - Dutch translation 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 @@ <description>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.</description> <licence>apache</licence> <author mail="dev@onlyoffice.com" homepage="https://www.onlyoffice.com/">Ascensio System SIA</author> - <version>7.6.6</version> + <version>7.6.8</version> <namespace>Onlyoffice</namespace> <types> <prevent_group_restriction/> diff --git a/controller/editorapicontroller.php b/controller/editorapicontroller.php index 713b865..c5d9049 100644 --- a/controller/editorapicontroller.php +++ b/controller/editorapicontroller.php @@ -377,7 +377,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")); } } |