diff options
author | redmatrix <git@macgirvin.com> | 2016-07-12 21:47:24 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-07-12 21:47:24 -0700 |
commit | f4e4e734de001de50b2a1a3119997b444bf12134 (patch) | |
tree | ec7d33b651aa7da3d6edc3b9026bb351fadb6da2 /Zotlabs/Module/Mail.php | |
parent | 6424bac47ce7f81991d23d2407cbb4c08dbfdf69 (diff) | |
download | volse-hubzilla-f4e4e734de001de50b2a1a3119997b444bf12134.tar.gz volse-hubzilla-f4e4e734de001de50b2a1a3119997b444bf12134.tar.bz2 volse-hubzilla-f4e4e734de001de50b2a1a3119997b444bf12134.zip |
more work on perms
Diffstat (limited to 'Zotlabs/Module/Mail.php')
-rw-r--r-- | Zotlabs/Module/Mail.php | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/Zotlabs/Module/Mail.php b/Zotlabs/Module/Mail.php index aae7585c4..043c28078 100644 --- a/Zotlabs/Module/Mail.php +++ b/Zotlabs/Module/Mail.php @@ -57,8 +57,6 @@ class Mail extends \Zotlabs\Web\Controller { $their_perms = 0; - $global_perms = get_perms(); - if($j['permissions']['data']) { $permissions = crypto_unencapsulate($j['permissions'],$channel['channel_prvkey']); if($permissions) @@ -68,13 +66,7 @@ class Mail extends \Zotlabs\Web\Controller { else $permissions = $j['permissions']; - foreach($permissions as $k => $v) { - if($v) { - $their_perms = $their_perms | intval($global_perms[$k][1]); - } - } - - if(! ($their_perms & PERMS_W_MAIL)) { + if(! ($permissions['post_mail'])) { notice( t('Selected channel has private message restrictions. Send failed.')); // reported issue: let's still save the message and continue. We'll just tell them // that nothing useful is likely to happen. They might have spent hours on it. @@ -120,7 +112,7 @@ class Mail extends \Zotlabs\Web\Controller { } - function get() { + function get() { $o = ''; nav_set_selected('messages'); |