mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
MDL-73620 mod_forum: Fix issue with discussion permission check
Users with access to some groups but not all would receive an error page when creating a discussion topic that was set to send to all groups
This commit is contained in:
parent
cc4fec275f
commit
43fd7457e3
@ -992,7 +992,7 @@ if ($mformpost->is_cancelled()) {
|
||||
forum_check_blocking_threshold($thresholdwarning);
|
||||
|
||||
foreach ($groupstopostto as $group) {
|
||||
if (!$capabilitymanager->can_create_discussions($USER, $groupid)) {
|
||||
if (!$capabilitymanager->can_create_discussions($USER, $group)) {
|
||||
throw new \moodle_exception('cannotcreatediscussion', 'forum');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user