Skip to content

Commit

Permalink
MDL-49994 files: Prevent to browse private files when are disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
jleyva authored and David Monllao committed May 6, 2015
1 parent 8e92f48 commit 57d9a75
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions files/externallib.php
Expand Up @@ -336,6 +336,7 @@ public static function upload($contextid, $component, $filearea, $itemid, $filep
$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');
}

Expand Down

0 comments on commit 57d9a75

Please sign in to comment.