aboutsummaryrefslogtreecommitdiffstats
path: root/include/feedutils.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-11-27 15:13:02 -0800
committerzotlabs <mike@macgirvin.com>2017-11-27 15:13:02 -0800
commit981631752a7571b22d9d8b3a8d7a6632f0a562a3 (patch)
tree51fb3f6d3a46926e1ea7778d17004f10a288dce7 /include/feedutils.php
parent4471f580d7a50126d42690f05e81a75f7bbf8084 (diff)
parentf3c0e212bf824df4f6b69abf079b5b138565f59c (diff)
downloadvolse-hubzilla-981631752a7571b22d9d8b3a8d7a6632f0a562a3.tar.gz
volse-hubzilla-981631752a7571b22d9d8b3a8d7a6632f0a562a3.tar.bz2
volse-hubzilla-981631752a7571b22d9d8b3a8d7a6632f0a562a3.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'include/feedutils.php')
-rw-r--r--include/feedutils.php31
1 files changed, 25 insertions, 6 deletions
diff --git a/include/feedutils.php b/include/feedutils.php
index 50f76b550..8f2c5d988 100644
--- a/include/feedutils.php
+++ b/include/feedutils.php
@@ -65,15 +65,34 @@ function get_feed_for($channel, $observer_hash, $params) {
if(! $channel)
http_status_exit(401);
+
+ // 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'))
- http_status_exit(403);
- } else {
- if(! perm_is_allowed($channel['channel_id'],$observer_hash,'view_stream'))
- http_status_exit(403);
+ 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);
+ }
+ }
}
- // logger('params: ' . print_r($params,true));
$feed_template = get_markup_template('atom_feed.tpl');