diff options
author | Mario <mario@mariovavti.com> | 2018-09-02 09:17:29 +0200 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-09-02 09:17:29 +0200 |
commit | 1b7781a1597b0c9ce49eaae3b9dd27bed7f3f7ed (patch) | |
tree | 512c014e48e6be489689c8598c061ce8ae31647e /Zotlabs/Module | |
parent | d66f58a550d61f17c46eca42cba84f45ae9c4628 (diff) | |
parent | e2824f925964fbfe160255de6e733b4c2de3cecb (diff) | |
download | volse-hubzilla-1b7781a1597b0c9ce49eaae3b9dd27bed7f3f7ed.tar.gz volse-hubzilla-1b7781a1597b0c9ce49eaae3b9dd27bed7f3f7ed.tar.bz2 volse-hubzilla-1b7781a1597b0c9ce49eaae3b9dd27bed7f3f7ed.zip |
Merge branch 'add-delivery-status-info' into 'dev'
Fix: Authors unable to comment on posts they authored when under owned by others…
See merge request hubzilla/core!1268
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Item.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index 640b4fa5c..a24d6da9c 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -29,7 +29,7 @@ use \Zotlabs\Lib as Zlib; class Item extends \Zotlabs\Web\Controller { function post() { - + // This will change. Figure out who the observer is and whether or not // they have permission to post here. Else ignore the post. @@ -237,10 +237,12 @@ class Item extends \Zotlabs\Web\Controller { if($parent) { logger('mod_item: item_post parent=' . $parent); $can_comment = false; - if((array_key_exists('owner',$parent_item)) && intval($parent_item['owner']['abook_self'])) - $can_comment = perm_is_allowed($profile_uid,$observer['xchan_hash'],'post_comments'); - else - $can_comment = can_comment_on_post($observer['xchan_hash'],$parent_item); + + $can_comment = can_comment_on_post($observer['xchan_hash'],$parent_item); + if (!$can_comment) { + if((array_key_exists('owner',$parent_item)) && intval($parent_item['owner']['abook_self'])==1 ) + $can_comment = perm_is_allowed($profile_uid,$observer['xchan_hash'],'post_comments'); + } if(! $can_comment) { notice( t('Permission denied.') . EOL) ; |