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

github.com/ONLYOFFICE/onlyoffice-nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Linnik <sergey.linnik@onlyoffice.com>2022-11-01 16:26:01 +0300
committerGitHub <noreply@github.com>2022-11-01 16:26:01 +0300
commit56319197e3e3eed302d1d3105278047a086dd5a8 (patch)
tree70d028984bdadb3d5276f46f3ac1887438ac731c
parentd42086c6fcc4edc60d2518d5c3d21d44e26f3d20 (diff)
parent3be3fc4197e98ed39e1c8c6705aff7f4e098e647 (diff)
Merge pull request #738 from ONLYOFFICE/feature/nc-25v7.6.8
Release/7.6.8
-rw-r--r--CHANGELOG.md4
-rw-r--r--appinfo/info.xml2
-rw-r--r--controller/editorapicontroller.php3
-rw-r--r--controller/editorcontroller.php3
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"));
}
}