aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Connedit.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-07-09 21:08:02 -0700
committerredmatrix <git@macgirvin.com>2016-07-09 21:08:02 -0700
commitc9db8c6857d8676b3eb3c19548eb303656dc5fff (patch)
treeb24726528d3fd98803fb481e350964f378fe6f28 /Zotlabs/Module/Connedit.php
parent917a465ccd7dfa4992241b1e5d4418b3a31f1615 (diff)
downloadvolse-hubzilla-c9db8c6857d8676b3eb3c19548eb303656dc5fff.tar.gz
volse-hubzilla-c9db8c6857d8676b3eb3c19548eb303656dc5fff.tar.bz2
volse-hubzilla-c9db8c6857d8676b3eb3c19548eb303656dc5fff.zip
more permissions work
Diffstat (limited to 'Zotlabs/Module/Connedit.php')
-rw-r--r--Zotlabs/Module/Connedit.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/Zotlabs/Module/Connedit.php b/Zotlabs/Module/Connedit.php
index a5c5175dc..445219894 100644
--- a/Zotlabs/Module/Connedit.php
+++ b/Zotlabs/Module/Connedit.php
@@ -676,6 +676,18 @@ class Connedit extends \Zotlabs\Web\Controller {
if($slide && $multiprofs)
$affinity = t('Set Affinity & Profile');
+ $theirs = q("select * from abconfig where chan = %d and xchan = '%s' and cat = 'their_perms'",
+ intval(local_channel()),
+ dbesc($contact['abook_xchan'])
+ );
+ $their_perms = array();
+ if($theirs) {
+ foreach($theirs as $t) {
+ $their_perms[$t['k']] = $t['v'];
+ }
+ }
+logger('theris: ' . print_r($their_perms,true));
+
foreach($global_perms as $k => $v) {
$thisperm = get_abconfig(local_channel(),$contact['abook_xchan'],'my_perms',$k);
//fixme
@@ -686,8 +698,11 @@ class Connedit extends \Zotlabs\Web\Controller {
// permissions because they are enabled for the channel owner
if((! $self) && ($existing[$k]))
$thisperm = "1";
+
+
+
- $perms[] = array('perms_' . $k, $v[3], (($contact['abook_their_perms'] & $v[1]) ? "1" : ""),$thisperm, $v[1], (($channel[$v[0]] == PERMS_SPECIFIC) ? '' : '1'), $v[4], $checkinherited);
+ $perms[] = array('perms_' . $k, $v, ((array_key_exists($k,$their_perms)) ? intval($their_perms[$k]) : ''),$thisperm, 1, (($checkinherited & PERMS_SPECIFIC) ? '' : '1'), '', $checkinherited);
}
$locstr = '';