Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion classes/util.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public static function setdebug() {
// Show the debug info box only if at leas one debug setting is active or the adhoc debug mode is used.
if (!empty($showdebuginfo) || static::is_adhoc_debug()) {
$infocontent->debugsettings = $debugsettings;
if (is_siteadmin()) { // For site admins the link to the setting should be shown.
if (has_capability('moodle/site:config', \context_system::instance(), $realuser)) {
$manageurl = new \moodle_url('/admin/tool/userdebug/index.php');
$infocontent->manageurl = $manageurl->out();
}
Expand Down
5 changes: 3 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
require_once($CFG->dirroot . '/' . $CFG->admin . '/roles/lib.php');

admin_externalpage_setup('tool_userdebug', '', null);
if (!is_siteadmin()) {
die;

if (!has_capability('moodle/site:config', context_system::instance())) {
return;
}

$mycfg = get_config('tool_userdebug');
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
defined('MOODLE_INTERNAL') || die;

$plugin->version = 2025070100;
$plugin->version = 2025110601;
$plugin->release = 'v5.0.1 (2025070100)';
$plugin->requires = 2025040800;
$plugin->maturity = MATURITY_STABLE;
Expand Down