Skip to content

Commit

Permalink
MDL-14261 fixed access control issues for backup and unittest plugins…
Browse files Browse the repository at this point in the history
…; merged from MOODLE_19_STABLE
  • Loading branch information
skodak committed Jul 5, 2008
1 parent 961ca45 commit 045ee35
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion admin/settings/top.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down

0 comments on commit 045ee35

Please sign in to comment.