1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-07 09:23:31 +02:00

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

This commit is contained in:
Michael Hawkins 2024-12-04 14:41:06 +08:00 committed by Huong Nguyen
parent 51be71b1bf
commit 950a829a31
No known key found for this signature in database
GPG Key ID: 40D88AB693A3E72A
2 changed files with 3 additions and 1 deletions
admin/tool/lp

@ -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,

@ -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.