mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-49994 files: Prevent to browse private files when are disabled
This commit is contained in:
parent
8e92f48c40
commit
57d9a750e3
@ -336,6 +336,7 @@ class core_files_external extends external_api {
|
||||
$context = self::get_context_from_params($fileinfo);
|
||||
self::validate_context($context);
|
||||
if (($fileinfo['component'] == 'user' and $fileinfo['filearea'] == 'private')) {
|
||||
require_capability('moodle/user:manageownfiles', $context);
|
||||
debugging('Uploading directly to user private files area is deprecated. Upload to a draft area and then move the files with core_user::add_user_private_files');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user