diff --git a/include/items.php b/include/items.php index da9311eb7..d979225ab 100644 --- a/include/items.php +++ b/include/items.php @@ -395,7 +395,12 @@ function post_activity_item($arr, $deliver = true, $channel = null, $observer = $arr['aid'] = ((isset($arr['aid'])) ? $arr['aid'] : $channel['channel_account_id']); $arr['uid'] = ((isset($arr['uid'])) ? $arr['uid'] : $channel['channel_id']); + logger('uid: ' . $arr['uid']); + logger('observer_hash: ' . $observer['xchan_hash']); + logger('permission: ' . (($is_comment) ? 'post_comments' : 'post_wall')); + if (! perm_is_allowed($arr['uid'], $observer['xchan_hash'], (($is_comment) ? 'post_comments' : 'post_wall'))) { + logger('permission denied'); $ret['message'] = t('Permission denied'); return $ret; }