diff --git a/admin/settings/top.php b/admin/settings/top.php index f2a8520b58b85..4651338ad44af 100644 --- a/admin/settings/top.php +++ b/admin/settings/top.php @@ -42,7 +42,12 @@ if ($reportname[1] == '[') { $reportname = get_string($plugin, 'admin'); } - $ADMIN->add('reports', new admin_externalpage('report'.$plugin, $reportname, "$CFG->wwwroot/$CFG->admin/report/$plugin/index.php",'moodle/site:viewreports')); + // ugly hack for special access control in reports + switch($plugin) { + case 'backups': $cap = 'moodle/site:backup'; break; + default: $cap = 'moodle/site:viewreports'; + } + $ADMIN->add('reports', new admin_externalpage('report'.$plugin, $reportname, "$CFG->wwwroot/$CFG->admin/report/$plugin/index.php",$cap)); } }