Merge branch 'MDL-49426-27' of git://github.com/jleyva/moodle into MOODLE_27_STABLE
This commit is contained in:
@@ -66,7 +66,12 @@ if ($fileuploaddisabled) {
|
||||
|
||||
// check the user can manage his own files (can upload)
|
||||
$context = context_user::instance($USER->id);
|
||||
require_capability('moodle/user:manageownfiles', $context);
|
||||
|
||||
// Allow allways to upload files to the draft area, no matter if the user can't manage his own files.
|
||||
// Files required by other webservices (like mod_assign ones) must be uploaded to the draft area.
|
||||
if ($filearea === 'private') {
|
||||
require_capability('moodle/user:manageownfiles', $context);
|
||||
}
|
||||
|
||||
if ($filearea !== 'private' and $filearea !== 'draft') {
|
||||
// Do not dare to allow more areas here!
|
||||
|
||||
Reference in New Issue
Block a user