pubstream comments and a few other bugfixes that were discovered along the way

This commit is contained in:
zotlabs
2017-11-26 18:29:24 -08:00
parent e1fdac3278
commit 0e91810ed6
12 changed files with 206 additions and 79 deletions

View File

@@ -65,16 +65,35 @@ function get_feed_for($channel, $observer_hash, $params) {
if(! $channel)
http_status_exit(401);
if($params['pages']) {
if(! perm_is_allowed($channel['channel_id'],$observer_hash,'view_pages'))
http_status_exit(403);
} else {
if(! perm_is_allowed($channel['channel_id'],$observer_hash,'view_stream'))
http_status_exit(403);
}
// logger('params: ' . print_r($params,true));
$interactive = ((is_array($params) && array_key_exists('interactive',$params)) ? intval($params['interactive']) : 0);
if($params['pages']) {
if(! perm_is_allowed($channel['channel_id'],$observer_hash,'view_pages')) {
if($interactive) {
return '';
}
else {
http_status_exit(403);
}
}
}
else {
if(! perm_is_allowed($channel['channel_id'],$observer_hash,'view_stream')) {
if($interactive) {
return '';
}
else {
http_status_exit(403);
}
}
}
$feed_template = get_markup_template('atom_feed.tpl');
$atom = '';