diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-04-27 19:27:24 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2021-06-28 17:45:17 +0300 |
commit | 088605aa1f3bc7826652cd539726f54d98035318 (patch) | |
tree | 1d17e42fb9b6e5b1fd8e6778ff80a6b614936b3a /lib | |
parent | 251988f90f07d7e2103f6a6a6e5f565b20119bee (diff) |
Fix opening files when groupfolder ACL has revoked share permissions
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/WopiController.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Controller/WopiController.php b/lib/Controller/WopiController.php index eb0e6ff2..93e83420 100644 --- a/lib/Controller/WopiController.php +++ b/lib/Controller/WopiController.php @@ -703,6 +703,9 @@ class WopiController extends Controller { $file = $node; } } else { + // Group folders requires an active user to be set in order to apply the proper acl permissions as for anonymous requests it requires share permissions for read access + // https://github.com/nextcloud/groupfolders/blob/e281b1e4514cf7ef4fb2513fb8d8e433b1727eb6/lib/Mount/MountProvider.php#L169 + $this->userScopeService->setUserScope($wopi->getEditorUid()); // Unless the editor is empty (public link) we modify the files as the current editor // TODO: add related share token to the wopi table so we can obtain the $userFolder = $this->rootFolder->getUserFolder($wopi->getUserForFileAccess()); |