diff --git a/mod/forum/post.php b/mod/forum/post.php index 448aa736ecc..2153cf6e283 100644 --- a/mod/forum/post.php +++ b/mod/forum/post.php @@ -874,6 +874,7 @@ if ($mform_post->is_cancelled()) { // If we are posting a copy to all groups the user has access to. if (isset($fromform->posttomygroups)) { + require_capability('mod/forum:canposttomygroups', $modcontext); $allowedgroups = groups_get_activity_allowed_groups($cm); $groupstopostto = array_keys($allowedgroups); } else {