From 605d358c3525c7e9a5b029835bd52ef974987962 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Thu, 14 Oct 2010 19:33:59 +0000 Subject: [PATCH] MDL-14627 fixed file_browser access control --- mod/folder/lib.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mod/folder/lib.php b/mod/folder/lib.php index f8cd8768d1e..3cffd252b2d 100644 --- a/mod/folder/lib.php +++ b/mod/folder/lib.php @@ -244,6 +244,9 @@ function folder_get_file_info($browser, $areas, $course, $cm, $context, $fileare if ($filearea === 'content') { + if (!has_capability('mod/folder:view', $context)) { + return NULL; + } $fs = get_file_storage(); $filepath = is_null($filepath) ? '/' : $filepath; -- 2.43.0