From 1712eceaf95e5e57d8f5866cb1f6100a0acd28b6 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 26 Jan 2020 15:08:55 +0000 Subject: port Lib/Connect and Module/Follow from zap. Connect with new connections via zot6 --- include/permissions.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include/permissions.php') diff --git a/include/permissions.php b/include/permissions.php index 501b2cc77..ca8ff6e93 100644 --- a/include/permissions.php +++ b/include/permissions.php @@ -554,4 +554,24 @@ function site_default_perms() { return $ret; } +function their_perms_contains($channel_id,$xchan_hash,$perm) { + $x = get_abconfig($channel_id,$xchan_hash,'system','their_perms'); + if($x) { + $y = explode(',',$x); + if(in_array($perm,$y)) { + return true; + } + } + return false; +} +function my_perms_contains($channel_id,$xchan_hash,$perm) { + $x = get_abconfig($channel_id,$xchan_hash,'system','my_perms'); + if($x) { + $y = explode(',',$x); + if(in_array($perm,$y)) { + return true; + } + } + return false; +} -- cgit v1.2.3