MDL-78792 message: access checks in processor fragment callback.

This commit is contained in:
Paul Holden 2023-07-21 17:06:34 +01:00 committed by Huong Nguyen
parent 058b830b07
commit 092273751b
No known key found for this signature in database
GPG Key ID: 40D88AB693A3E72A

View File

@ -696,6 +696,10 @@ function message_output_fragment_processor_settings($args = []) {
$userid = $args['userid'];
$user = core_user::get_user($userid, '*', MUST_EXIST);
if (!core_message_can_edit_message_profile($user)) {
throw new moodle_exception('Cannot edit message profile');
}
$processor = get_message_processor($type);
$providers = message_get_providers_for_user($userid);
$processorwrapper = new stdClass();