obscure permission issue with custom permissions when using the highly discouraged advisory privacy modes

This commit is contained in:
zotlabs 2018-03-12 15:47:33 -07:00
parent 717ae54868
commit 34399b8b47
2 changed files with 10 additions and 0 deletions

View file

@ -830,6 +830,12 @@ class Item extends \Zotlabs\Web\Controller {
$datarray['plink'] = $plink;
$datarray['route'] = $route;
// A specific ACL over-rides public_policy completely
if(! empty_acl($datarray))
$datarray['public_policy'] = '';
if($iconfig)
$datarray['iconfig'] = $iconfig;

View file

@ -969,6 +969,10 @@ function import_author_unknown($x) {
return false;
}
function empty_acl($item) {
return (($item['allow_cid'] === EMPTY_STR && $item['allow_gid'] === EMPTY_STR && $item['deny_cid'] === EMPTY_STR && $item['deny_gid'] === EMPTY_STR) ? true : false);
}
function encode_item($item,$mirror = false) {
$x = array();
$x['type'] = 'activity';