mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
backupdata folder is not visible in directory resource any more, the backup files were not downloadable, but they might be stored in browser cache when teacher and student were logged from the same browser and computer account - MDL-6280 ; merged from MOODLE_16_STABLE
This commit is contained in:
parent
88768091a4
commit
de9a33f3c9
11
file.php
11
file.php
@ -53,11 +53,12 @@
|
||||
}
|
||||
|
||||
// security: only editing teachers can access backups
|
||||
if ((!has_capability('moodle/site:backup', get_context_instance(CONTEXT_COURSE, $course->id)))
|
||||
and (count($args) >= 2)
|
||||
and (strtolower($args[1]) == 'backupdata')) {
|
||||
|
||||
error('Access not allowed');
|
||||
if ((count($args) >= 2) and (strtolower($args[1]) == 'backupdata')) {
|
||||
if (!has_capability('moodle/site:backup', get_context_instance(CONTEXT_COURSE, $course->id))) {
|
||||
error('Access not allowed');
|
||||
} else {
|
||||
$lifetime = 0; //disable browser caching for backups
|
||||
}
|
||||
}
|
||||
|
||||
if (is_dir($pathname)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user