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
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-01-09 14:57:26 +0300
committerGitHub <noreply@github.com>2019-01-09 14:57:26 +0300
commit53b6fa1194d6fb90708d9411beddce7145f61307 (patch)
treea2b1f1f2b1d192cab71cc142641a8dd69cb1b47b /lib
parent64e9b2dc9c366e444d366a80fb39e7cb09af8755 (diff)
parente2e477b638bc978e760bb2190cec667bffcf489e (diff)
Merge pull request #341 from nhirokinet/feature/adapt_groupfolder
Richdocument on Android did not work in groupfolders
Diffstat (limited to 'lib')
-rw-r--r--lib/TokenManager.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/TokenManager.php b/lib/TokenManager.php
index 98707420..9918aa30 100644
--- a/lib/TokenManager.php
+++ b/lib/TokenManager.php
@@ -131,7 +131,13 @@ class TokenManager {
$file = $rootFolder->getById($fileId)[0];
// If its a public share, use the owner from the share, otherwise check the file object
if (is_null($owneruid)) {
- $owneruid = $file->getOwner()->getUID();
+ $owner = $file->getOwner();
+ if (is_null($owner)) {
+ // Editor UID instead of owner UID in case owner is null e.g. group folders
+ $owneruid = $editoruid;
+ } else {
+ $owneruid = $owner->getUID();
+ }
}
$serverHost = $this->urlGenerator->getAbsoluteURL('/');//$this->request->getServerProtocol() . '://' . $this->request->getServerHost();