mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-78792 message: access checks in processor fragment callback.
This commit is contained in:
parent
058b830b07
commit
092273751b
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user