using taglist-account for acl popup, thought we need to fix taglist-account to automatic convert nummerical account_id to user-readable names

This commit is contained in:
Ralf Becker 2014-02-28 12:44:27 +00:00
parent 9be29f5122
commit f8a25df5c1
2 changed files with 18 additions and 6 deletions

View File

@ -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
{

View File

@ -42,7 +42,7 @@
<description value="Action"/>
</row>
<row class="row">
<taglist-email id="${row}[acc_id]" allowFreeEntries="true" maxSelection="1" />
<taglist-account id="${row}[acc_id]" allowFreeEntries="true" maxSelection="1" />
<menulist>
<menupopup id="${row}[acl]" onchange="app.mail.acl_common_rights_selector"/>
</menulist>