mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-49994 files: Prevent to browse private files when are disabled
This commit is contained in:
parent
8e92f48c40
commit
57d9a750e3
1 changed files with 1 additions and 0 deletions
|
@ -336,6 +336,7 @@ class core_files_external extends external_api {
|
||||||
$context = self::get_context_from_params($fileinfo);
|
$context = self::get_context_from_params($fileinfo);
|
||||||
self::validate_context($context);
|
self::validate_context($context);
|
||||||
if (($fileinfo['component'] == 'user' and $fileinfo['filearea'] == 'private')) {
|
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');
|
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…
Add table
Add a link
Reference in a new issue