MDL-36620 - Blog, RSS - Preventing Guests from viewing the RSS of site level blogs
Conflicts: blog/rsslib.php
This commit is contained in:
committed by
Dan Poltawski
parent
890066d6dc
commit
591b34218c
@@ -109,6 +109,13 @@ function blog_rss_get_feed($context, $args) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if ($CFG->bloglevel == BLOG_SITE_LEVEL) {
|
||||
if (isguestuser()) {
|
||||
debugging(get_string('nopermissiontoshow','error'));
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
|
||||
if (!has_capability('moodle/blog:view', $sitecontext)) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user