MDL-83921 competency: Match web service capability check with page check

This commit is contained in:
Michael Hawkins
2024-12-05 11:21:23 +07:00
committed by Huong Nguyen
parent fcff77046d
commit c748e7d7e9
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -864,6 +864,8 @@ class external extends external_api {
$context = context_system::instance();
self::validate_context($context);
require_capability('moodle/competency:templatemanage', $context);
$output = $PAGE->get_renderer('tool_lp');
list($filtercapsql, $filtercapparams) = api::filter_users_with_capability_on_user_context_sql($cap,
+1 -1
View File
@@ -128,7 +128,7 @@ $functions = array(
'classpath' => '',
'description' => 'Search for users.',
'type' => 'read',
'capabilities' => '',
'capabilities' => 'moodle/competency:templatemanage',
'ajax' => true,
),
// This function was originally in this plugin but has been moved to core.