MDL-74344 comment: consistent capability check for accessing report.

Co-authored-by: David Wipperfurth <[email protected]>
This commit is contained in:
Paul Holden
2022-05-13 10:31:24 +01:00
co-authored by David Wipperfurth
parent b8e9cb31e9
commit 590088f118
2 changed files with 4 additions and 4 deletions
+4 -1
View File
@@ -492,7 +492,10 @@ if ($hassiteconfig && !empty($CFG->enableplagiarism)) {
$plugin->load_settings($ADMIN, 'plagiarism', $hassiteconfig);
}
}
$ADMIN->add('reports', new admin_externalpage('comments', new lang_string('comments'), $CFG->wwwroot.'/comment/', 'moodle/site:viewreports'));
// Comments report, note this page is really just a means to delete comments so check that.
$ADMIN->add('reports', new admin_externalpage('comments', new lang_string('comments'), $CFG->wwwroot . '/comment/index.php',
'moodle/comment:delete'));
// Course reports settings
if ($hassiteconfig) {