From 0a45ff76deb5513c778f3e8a04d4e2a83c1828df Mon Sep 17 00:00:00 2001 From: Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de> Date: Mon, 21 Feb 2022 23:07:21 +0100 Subject: [PATCH] Revert "Biest #465" This reverts commit b940d493cfd1ab367d01d8626e401ee47998e582. Fixes #646 --- lib/classes/JsonApi/Routes/Files/Authority.php | 5 ----- lib/classes/JsonApi/Routes/Files/SubfilerefsIndex.php | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/classes/JsonApi/Routes/Files/Authority.php b/lib/classes/JsonApi/Routes/Files/Authority.php index 7f845588195..8f25bb6cc91 100644 --- a/lib/classes/JsonApi/Routes/Files/Authority.php +++ b/lib/classes/JsonApi/Routes/Files/Authority.php @@ -38,11 +38,6 @@ class Authority return $folder->isReadable($user->id); } - public static function canShowFolderFileRefs(User $user, \FolderType $folder) - { - return self::canShowFolder($user, $folder) || $folder->download_allowed; - } - public static function canUpdateFolder(User $user, \FolderType $folder) { return $folder->isEditable($user->id); diff --git a/lib/classes/JsonApi/Routes/Files/SubfilerefsIndex.php b/lib/classes/JsonApi/Routes/Files/SubfilerefsIndex.php index 994a4b45292..0ff06032545 100644 --- a/lib/classes/JsonApi/Routes/Files/SubfilerefsIndex.php +++ b/lib/classes/JsonApi/Routes/Files/SubfilerefsIndex.php @@ -24,7 +24,7 @@ class SubfilerefsIndex extends JsonApiController throw new RecordNotFoundException(); } - if (!Authority::canShowFolderFileRefs($this->getUser($request), $folder)) { + if (!Authority::canShowFolder($this->getUser($request), $folder)) { throw new AuthorizationFailedException(); } -- GitLab