From b16085c3ff2d164380226770411faa99e3c1e894 Mon Sep 17 00:00:00 2001 From: Kevin LaFleur <35120091+KLaFleur@users.noreply.github.com> Date: Wed, 26 Apr 2023 10:21:50 -0400 Subject: [PATCH] [media] changed permision check to media_read to enable media downloads (#8671) Changed permission check in filedownload.php so that files in the media widget download when the user has media_read permission. Fixes #8583 --- modules/media/ajax/FileDownload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/media/ajax/FileDownload.php b/modules/media/ajax/FileDownload.php index 261c576bc73..d2ea74d82c6 100644 --- a/modules/media/ajax/FileDownload.php +++ b/modules/media/ajax/FileDownload.php @@ -17,7 +17,7 @@ $user =& User::singleton(); //NOTE Should this be 'media_read' instead? It seems that downloading files //should be a read permission, not write. -if (!$user->hasPermission('media_write')) { +if (!$user->hasPermission('media_read')) { header("HTTP/1.1 403 Forbidden"); exit; }