- added relevant cap check on restorefile.php to improve the error
message when attempting to restore automated backups. This cap is
already responsible for controlling restores from automated areas.
- Restored the 'viewautomatedfilearea' capabilities original lang
string.
// choose the backup file from backup files tree
if ($action == 'choosebackupfile') {
+ if ($filearea == 'automated') {
+ require_capability('moodle/restore:viewautomatedfilearea', $context);
+ }
if ($fileinfo = $browser->get_file_info($filecontext, $component, $filearea, $itemid, $filepath, $filename)) {
if (is_a($fileinfo, 'file_info_stored')) {
// Use the contenthash rather than copying the file where possible,
$string['restore:rolldates'] = 'Allowed to roll activity configuration dates on restore';
$string['restore:uploadfile'] = 'Upload files to backup areas';
$string['restore:userinfo'] = 'Restore user data';
-$string['restore:viewautomatedfilearea'] = 'View automated backup area';
+$string['restore:viewautomatedfilearea'] = 'Restore courses from automated backups';
$string['risks'] = 'Risks';
$string['roleallowheader'] = 'Allow role:';
$string['roleallowinfo'] = 'Select a role to be added to the list of allowed roles in context "{$a->context}", capability "{$a->cap}":';