mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-64820 forum: Correct capability check and redir
This commit is contained in:
parent
e5a501de13
commit
7aa6affa49
@ -85,14 +85,16 @@ if (empty($cm->visible) && !has_capability('moodle/course:viewhiddenactivities',
|
||||
redirect(
|
||||
$urlfactory->get_course_url_from_forum($forum),
|
||||
get_string('activityiscurrentlyhidden'),
|
||||
null,
|
||||
\core\output\notification::NOTIFY_WARNING
|
||||
);
|
||||
}
|
||||
|
||||
if (!$capabilitymanager->can_view_discussions($USER, $forum)) {
|
||||
if (!$capabilitymanager->can_view_discussions($USER)) {
|
||||
redirect(
|
||||
$urlfactory->get_course_url_from_forum($forum),
|
||||
get_string('noviewdiscussionspermission', 'fourm'),
|
||||
null,
|
||||
\core\output\notification::NOTIFY_WARNING
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user