Skip to content

Commit

Permalink
MDL-78792 message: access checks in processor fragment callback.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulholden authored and HuongNV13 committed Aug 10, 2023
1 parent 058b830 commit 0922737
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions message/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 0922737

Please sign in to comment.