mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
merged fix for MDL-8987, guests should not see blogs flagged as site blogs
This commit is contained in:
parent
e2e9c024e9
commit
fa5278283f
@ -528,7 +528,7 @@
|
||||
$tagquerysql = '';
|
||||
}
|
||||
|
||||
if (isloggedin()) {
|
||||
if (isloggedin() && !has_capability('moodle/legacy:guest', get_context_instance(CONTEXT_SYSTEM, SITEID), $USER->id, false)) {
|
||||
$permissionsql = '(p.publishstate = \'site\' OR p.publishstate = \'public\' OR p.userid = '.$USER->id.')';
|
||||
} else {
|
||||
$permissionsql = 'p.publishstate = \'public\'';
|
||||
|
Loading…
x
Reference in New Issue
Block a user