mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-36620 - Blog, RSS - Preventing Guests from viewing the RSS of site level blogs
This commit is contained in:
parent
7a216229ab
commit
21c3b51e27
@ -163,6 +163,13 @@ function blog_rss_get_feed($context, $args) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if ($CFG->bloglevel == BLOG_SITE_LEVEL) {
|
||||
if (isguestuser()) {
|
||||
debugging(get_string('nopermissiontoshow','error'));
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
$sitecontext = context_system::instance();
|
||||
if (!has_capability('moodle/blog:view', $sitecontext)) {
|
||||
return null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user