Merge pull request #42680 from nextcloud/artonge/fix/view_only_error_message

Improve view only error message
This commit is contained in:
Louis 2024-01-11 12:12:47 +01:00 committed by GitHub
commit 14180c576f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -97,7 +97,7 @@ class ViewOnlyPlugin extends ServerPlugin {
// Check if read-only and on whether permission can download is both set and disabled.
$canDownload = $attributes->getAttribute('permissions', 'download');
if ($canDownload !== null && !$canDownload) {
throw new Forbidden('Access to this resource has been denied because it is in view-only mode.');
throw new Forbidden('Access to this shared resource has been denied because its download permission is disabled.');
}
} catch (NotFound $e) {
// File not found