diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php
index 2e4618cd09..01fd150355 100644
--- a/lib/outputrenderers.php
+++ b/lib/outputrenderers.php
@@ -357,7 +357,7 @@ public function standard_footer_html() {
if (!empty($CFG->debugpageinfo)) {
$output .= '
This page is: ' . $this->page->debug_summary() . '
';
}
- if (debugging(null, DEBUG_DEVELOPER)) { // Only in developer mode
+ if (debugging(null, DEBUG_DEVELOPER) and has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) { // Only in developer mode
$output .= '';
}
if (!empty($CFG->debugvalidators)) {