From f8a25df5c1831301cefbf6526a3826445579e382 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 28 Feb 2014 12:44:27 +0000 Subject: [PATCH] using taglist-account for acl popup, thought we need to fix taglist-account to automatic convert nummerical account_id to user-readable names --- mail/inc/class.mail_acl.inc.php | 22 +++++++++++++++++----- mail/templates/default/acl.xet | 2 +- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/mail/inc/class.mail_acl.inc.php b/mail/inc/class.mail_acl.inc.php index fbfc0ca5f5..54fb9404f1 100644 --- a/mail/inc/class.mail_acl.inc.php +++ b/mail/inc/class.mail_acl.inc.php @@ -103,10 +103,16 @@ class mail_acl { $content['grid'][$n]['acl'] = 'custom'; } - - $content['grid'][$n++]['acc_id'] = $keys; - + if (($account_id = $this->mail_bo->icServer->getMailBoxAccountId($keys))) + { + $content['grid'][$n++]['acc_id'] = $account_id; + } + else + { + $content['grid'][$n++]['acc_id'] = $keys; + } } + //error_log(__METHOD__."() acl=".array2string($acl).' --> grid='.array2string($content['grid'])); } array_push($content['grid'], array('acc_id'=>'')); } @@ -204,9 +210,15 @@ class mail_acl $options['rights'] .= $right[1]; } } - if (!empty($content['grid'][$keys]['acc_id'][0])) + $username = $content['grid'][$keys]['acc_id'][0]; + if (is_numeric($username) && ($u = $this->mail_bo->icServer->getMailBoxUserName($username))) { - $this->setACL($content['mailbox'], $content['grid'][$keys]['acc_id'][0], $options,$recursive); + $username = $u; + } + if (!empty($username)) + { + //error_log(__METHOD__."() setACL($content[mailbox], $username, ".array2string($options).", $recursive)"); + $this->setACL($content['mailbox'], $username, $options, $recursive); } else { diff --git a/mail/templates/default/acl.xet b/mail/templates/default/acl.xet index 3ea5130ce3..0abb02a76a 100755 --- a/mail/templates/default/acl.xet +++ b/mail/templates/default/acl.xet @@ -42,7 +42,7 @@ - +