mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Even more automation: now blocks_execute_url_action() checks if the user
has sufficient rights to execute the action automatically. It's therefore safe to call without ANY checks being done first.
This commit is contained in:
parent
0144a0a701
commit
3edc57e189
@ -482,7 +482,7 @@ function blocks_execute_action($page, &$pageblocks, $blockaction, $instanceorid)
|
||||
function blocks_execute_url_action(&$PAGE, &$pageblocks) {
|
||||
$blockaction = optional_param('blockaction');
|
||||
|
||||
if (empty($blockaction) || !confirm_sesskey()) {
|
||||
if (empty($blockaction) || !$PAGE->user_allowed_editing() || !confirm_sesskey()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user