aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-10-16 10:21:58 +0000
committerMario <mario@mariovavti.com>2020-10-16 10:21:58 +0000
commitd84f0030beaf353b3bd3e02e21019663988227ef (patch)
tree7b1fb4619df7bc78e27203632b332706747fdaba /Zotlabs/Lib
parent61f554e0d7820b19f7ecb7b6d216f3012dc23acf (diff)
downloadvolse-hubzilla-d84f0030beaf353b3bd3e02e21019663988227ef.tar.gz
volse-hubzilla-d84f0030beaf353b3bd3e02e21019663988227ef.tar.bz2
volse-hubzilla-d84f0030beaf353b3bd3e02e21019663988227ef.zip
on refresh, always set all perms
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/Libzot.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index 44f1f399e..f0fe3ab24 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -326,14 +326,10 @@ class Libzot {
if($permissions && is_array($permissions)) {
$old_read_stream_perm = get_abconfig($channel['channel_id'],$x['hash'],'their_perms','view_stream');
- // We need to reset their_perms prior to setting the new ones.
- // Otherwise withdrawn permissions will not take effect locally.
- q("DELETE FROM abconfig WHERE chan = %d AND xchan = '%s' AND cat = 'their_perms'",
- intval($channel['channel_id']),
- dbesc($x['hash'])
- );
- foreach($permissions as $p) {
- set_abconfig($channel['channel_id'],$x['hash'],'their_perms',$p,'1');
+ $permissions = Permissions::FilledPerms($permissions);
+
+ foreach($permissions as $k => $v) {
+ set_abconfig($channel['channel_id'],$x['hash'],'their_perms',$k,$v);
}
}