diff options
author | Mario <mario@mariovavti.com> | 2021-09-06 09:10:19 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-09-06 09:10:19 +0000 |
commit | 8d28649e1b64e8d4eb15fd3923020950a58966e7 (patch) | |
tree | 17350748850255de7129339f0abfc4725b267714 /Zotlabs/Lib/Libzot.php | |
parent | 9495fef79bb299aa114bbda72e32ae0a2659e436 (diff) | |
download | volse-hubzilla-8d28649e1b64e8d4eb15fd3923020950a58966e7.tar.gz volse-hubzilla-8d28649e1b64e8d4eb15fd3923020950a58966e7.tar.bz2 volse-hubzilla-8d28649e1b64e8d4eb15fd3923020950a58966e7.zip |
check the post_mail permission for direct messages
Diffstat (limited to 'Zotlabs/Lib/Libzot.php')
-rw-r--r-- | Zotlabs/Lib/Libzot.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php index cb55a4e67..9c232f34d 100644 --- a/Zotlabs/Lib/Libzot.php +++ b/Zotlabs/Lib/Libzot.php @@ -1601,6 +1601,12 @@ class Libzot { $friendofriend = true; } + if (intval($arr['item_private']) === 2) { + if (!perm_is_allowed($channel['channel_id'], $sender, 'post_mail')) { + $allowed = false; + } + } + if (!$allowed) { logger("permission denied for delivery to channel {$channel['channel_id']} {$channel['channel_address']}"); $DR->update('permission denied'); |