mirror of
https://github.com/moodle/moodle.git
synced 2025-02-13 12:34:28 +01:00
MDL-14952 - roles: 'moodle/legacy:guest' was preventing admins to post
new discussions in fron page if $CFG->defaultfrontpageroleid = guest. Merged from 19_STABLE
This commit is contained in:
parent
4436a63b64
commit
0e442226f3
@ -4697,11 +4697,6 @@ function forum_user_can_post_discussion($forum, $currentgroup=null, $unused=-1,
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
}
|
||||
|
||||
// normal users with temporary guest access can not add discussions
|
||||
if (has_capability('moodle/legacy:guest', $context, $USER->id, false)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($currentgroup === null) {
|
||||
$currentgroup = groups_get_activity_group($cm);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user