Skip to content

Commit

Permalink
[media] changed permision check to media_read to enable media downloa…
Browse files Browse the repository at this point in the history
…ds (#8671)

Changed permission check in filedownload.php so that files in the media widget download when the user has media_read permission.

Fixes #8583
  • Loading branch information
KLaFleur committed Apr 26, 2023
1 parent debf814 commit b16085c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/media/ajax/FileDownload.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b16085c

Please # to comment.