forked from extern/egroupware
* Admin: New setting for admin users with available administrator password to be able to modify mail ACL rights and vacation notices (no longer in admin context menu but under edit account->forward... tab) of each accounts via both mail and admin app.
-Backported commits: r48728, r48729, r48734, r48743, r48671, r48765, r48766, r48775, r48776, r48777.
This commit is contained in:
parent
fec60aa03a
commit
b831d2c593
@ -132,7 +132,7 @@ class emailadmin_imap extends Horde_Imap_Client_Socket implements defaultimap
|
||||
*
|
||||
* @param array
|
||||
* @param bool|int|string $_adminConnection create admin connection if true or account_id or imap username
|
||||
* @param int $_timeout=null timeout in secs, if none given fmail pref or default of 20 is used
|
||||
* @param int $_timeout =null timeout in secs, if none given fmail pref or default of 20 is used
|
||||
* @return void
|
||||
*/
|
||||
function __construct(array $params, $_adminConnection=false, $_timeout=null)
|
||||
@ -197,7 +197,7 @@ class emailadmin_imap extends Horde_Imap_Client_Socket implements defaultimap
|
||||
*
|
||||
* Plugins can overwrite it to eg. construct a special admin user name
|
||||
*
|
||||
* @param string $_username=null create an admin connection for given user or $this->acc_imap_username
|
||||
* @param string $_username =null create an admin connection for given user or $this->acc_imap_username
|
||||
*/
|
||||
function adminConnection($_username=true)
|
||||
{
|
||||
@ -206,13 +206,14 @@ class emailadmin_imap extends Horde_Imap_Client_Socket implements defaultimap
|
||||
$this->logout();
|
||||
|
||||
$this->__construct($this->params, $_username);
|
||||
$this->acc_imap_username = $_username;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check admin credientials and connection (if supported)
|
||||
*
|
||||
* @param string $username=null create an admin connection for given user or $this->acc_imap_username
|
||||
* @param string $_username =null create an admin connection for given user or $this->acc_imap_username
|
||||
* @throws Horde_IMAP_Client_Exception
|
||||
*/
|
||||
public function checkAdminConnection($_username=true)
|
||||
@ -267,7 +268,7 @@ class emailadmin_imap extends Horde_Imap_Client_Socket implements defaultimap
|
||||
* opens a connection to a imap server
|
||||
*
|
||||
* @param bool $_adminConnection create admin connection if true
|
||||
* @param int $_timeout=null timeout in secs, if none given fmail pref or default of 20 is used
|
||||
* @param int $_timeout =null timeout in secs, if none given fmail pref or default of 20 is used
|
||||
* @deprecated allready called by constructor automatic, parameters must be passed to constructor!
|
||||
* @return boolean|PEAR_Error true on success, PEAR_Error of false on failure
|
||||
*/
|
||||
@ -752,7 +753,7 @@ class emailadmin_imap extends Horde_Imap_Client_Socket implements defaultimap
|
||||
* examineMailbox
|
||||
*
|
||||
* @param string $mailbox
|
||||
* @param int $flags=null default Horde_Imap_Client::STATUS_ALL | Horde_Imap_Client::STATUS_FLAGS | Horde_Imap_Client::STATUS_PERMFLAGS
|
||||
* @param int $flags =null default Horde_Imap_Client::STATUS_ALL | Horde_Imap_Client::STATUS_FLAGS | Horde_Imap_Client::STATUS_PERMFLAGS
|
||||
* @return array of counters for mailbox
|
||||
*/
|
||||
function examineMailbox($mailbox, $flags=null)
|
||||
@ -863,6 +864,111 @@ class emailadmin_imap extends Horde_Imap_Client_Socket implements defaultimap
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* getFolderPrefixFromNamespace, wrapper to extract the folder prefix from folder compared to given namespace array
|
||||
*
|
||||
* @var array $_nameSpace
|
||||
* @var string $_folderName
|
||||
* @return string the prefix (may be an empty string)
|
||||
*/
|
||||
static function getFolderPrefixFromNamespace($_nameSpace, $_folderName)
|
||||
{
|
||||
foreach($_nameSpace as &$singleNameSpace)
|
||||
{
|
||||
if (substr($_folderName,0,strlen($singleNameSpace['prefix'])) == $singleNameSpace['prefix']) return $singleNameSpace['prefix'];
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* getMailBoxesRecursive
|
||||
*
|
||||
* function to retrieve mailboxes recursively from given mailbox
|
||||
* @param string $_mailbox
|
||||
* @param string $delimiter
|
||||
* @param string $prefix
|
||||
* @param string $reclevel = 0, counter to keep track of the current recursionlevel
|
||||
* @return array of mailboxes
|
||||
*/
|
||||
function getMailBoxesRecursive($_mailbox, $delimiter, $prefix, $reclevel=0)
|
||||
{
|
||||
if ($reclevel > 25) {
|
||||
error_log( __METHOD__." Recursion Level Exeeded ($reclevel) while looking up $_mailbox$delimiter ");
|
||||
return array();
|
||||
}
|
||||
$reclevel++;
|
||||
// clean up double delimiters
|
||||
$mailbox = preg_replace('~'.($delimiter == '.' ? "\\".$delimiter:$delimiter).'+~s',$delimiter,$_mailbox);
|
||||
//get that mailbox in question
|
||||
$mbx = $this->getMailboxes($mailbox,1,true);
|
||||
$mbxkeys = array_keys($mbx);
|
||||
|
||||
// Example: Array([INBOX/GaGa] => Array([MAILBOX] => INBOX/GaGa[ATTRIBUTES] => Array([0] => \\unmarked)[delimiter] => /))
|
||||
if (is_array($mbx[$mbxkeys[0]]["ATTRIBUTES"]) && (in_array('\HasChildren',$mbx[$mbxkeys[0]]["ATTRIBUTES"]) || in_array('\Haschildren',$mbx[$mbxkeys[0]]["ATTRIBUTES"]) || in_array('\haschildren',$mbx[$mbxkeys[0]]["ATTRIBUTES"])))
|
||||
{
|
||||
$buff = $this->getMailboxes($mbx[$mbxkeys[0]]['MAILBOX'].($mbx[$mbxkeys[0]]['MAILBOX'] == $prefix ? '':$delimiter),2,false);
|
||||
$allMailboxes = array();
|
||||
foreach ($buff as $mbxname) {
|
||||
$mbxname = preg_replace('~'.($delimiter == '.' ? "\\".$delimiter:$delimiter).'+~s',$delimiter,$mbxname['MAILBOX']);
|
||||
#echo "About to recur in level $reclevel:".$mbxname."<br>";
|
||||
if ( $mbxname != $mbx[$mbxkeys[0]]['MAILBOX'] && $mbxname != $prefix && $mbxname != $mbx[$mbxkeys[0]]['MAILBOX'].$delimiter)
|
||||
{
|
||||
$allMailboxes = array_merge($allMailboxes, self::getMailBoxesRecursive($mbxname, $delimiter, $prefix, $reclevel));
|
||||
}
|
||||
}
|
||||
if (!(in_array('\NoSelect',$mbx[$mbxkeys[0]]["ATTRIBUTES"]) || in_array('\Noselect',$mbx[$mbxkeys[0]]["ATTRIBUTES"]) || in_array('\noselect',$mbx[$mbxkeys[0]]["ATTRIBUTES"]))) $allMailboxes[] = $mbx[$mbxkeys[0]]['MAILBOX'];
|
||||
return $allMailboxes;
|
||||
}
|
||||
else
|
||||
{
|
||||
return array($mailbox);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* getNameSpace, fetch the namespace from icServer
|
||||
*
|
||||
* Note: a IMAPServer may present several namespaces under each key;
|
||||
* so we return an array of namespacearrays for our needs
|
||||
*
|
||||
* @return array array(prefix_present=>mixed (bool/string) ,prefix=>string,delimiter=>string,type=>string (personal|others|shared))
|
||||
*/
|
||||
function getNameSpace()
|
||||
{
|
||||
static $nameSpace=null;
|
||||
$foldersNameSpace = array();
|
||||
$delimiter = $this->getDelimiter();
|
||||
if (is_null($nameSpace)) $nameSpace = $this->getNameSpaceArray();
|
||||
if (is_array($nameSpace)) {
|
||||
foreach($nameSpace as $type => $singleNameSpaceArray)
|
||||
{
|
||||
foreach ($singleNameSpaceArray as $singleNameSpace)
|
||||
{
|
||||
$_foldersNameSpace = array();
|
||||
if($type == 'personal' && $singleNameSpace['name'] == '#mh/' && ($this->folderExists('Mail')||$this->folderExists('INBOX')))
|
||||
{
|
||||
$_foldersNameSpace['prefix_present'] = 'forced';
|
||||
// uw-imap server with mailbox prefix or dovecot maybe
|
||||
$_foldersNameSpace['prefix'] = ($this->folderExists('Mail')?'Mail':(!empty($singleNameSpace['name'])?$singleNameSpace['name']:''));
|
||||
}
|
||||
elseif($type == 'personal' && ($singleNameSpace['name'] == '#mh/') && $this->folderExists('mail'))
|
||||
{
|
||||
$_foldersNameSpace['prefix_present'] = 'forced';
|
||||
// uw-imap server with mailbox prefix or dovecot maybe
|
||||
$_foldersNameSpace['prefix'] = 'mail';
|
||||
} else {
|
||||
$_foldersNameSpace['prefix_present'] = !empty($singleNameSpace['name']);
|
||||
$_foldersNameSpace['prefix'] = $singleNameSpace['name'];
|
||||
}
|
||||
$_foldersNameSpace['delimiter'] = ($singleNameSpace['delimiter']?$singleNameSpace['delimiter']:$delimiter);
|
||||
$_foldersNameSpace['type'] = $type;
|
||||
$foldersNameSpace[] =$_foldersNameSpace;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $foldersNameSpace;
|
||||
}
|
||||
|
||||
/**
|
||||
* return the delimiter used by the current imap server
|
||||
* @param mixed _type (1=personal, 2=user/other, 3=shared)
|
||||
@ -1003,12 +1109,12 @@ class emailadmin_imap extends Horde_Imap_Client_Socket implements defaultimap
|
||||
return false;
|
||||
}
|
||||
|
||||
$_username = $this->getMailBoxUserName($_username);
|
||||
$username = $this->getMailBoxUserName($_username);
|
||||
if($this->loginType == 'vmailmgr' || $this->loginType == 'email' || $this->loginType == 'uidNumber') {
|
||||
$_username .= '@'. $this->domainName;
|
||||
$username .= '@'. $this->domainName;
|
||||
}
|
||||
|
||||
$mailboxString = $nameSpaces['others'][0]['name'] . $_username . (!empty($_folderName) ? $nameSpaces['others'][0]['delimiter'] . $_folderName : '');
|
||||
$mailboxString = $nameSpaces['others'][0]['name'] . $username . (!empty($_folderName) ? $nameSpaces['others'][0]['delimiter'] . $_folderName : '');
|
||||
|
||||
return $mailboxString;
|
||||
}
|
||||
@ -1041,7 +1147,7 @@ class emailadmin_imap extends Horde_Imap_Client_Socket implements defaultimap
|
||||
);
|
||||
}
|
||||
}
|
||||
//error_log(__METHOD__.__LINE__.array2string($result));
|
||||
//error_log(__METHOD__."() returning ".array2string($result));
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -1192,7 +1298,7 @@ class emailadmin_imap extends Horde_Imap_Client_Socket implements defaultimap
|
||||
*
|
||||
* @param int|string $_euser nummeric account_id or imap username
|
||||
* @param array $_vacation
|
||||
* @param string $_scriptName=null
|
||||
* @param string $_scriptName =null
|
||||
* @return boolean
|
||||
*/
|
||||
public function setVacationUser($_euser, array $_vacation, $_scriptName=null)
|
||||
@ -1220,7 +1326,7 @@ class emailadmin_imap extends Horde_Imap_Client_Socket implements defaultimap
|
||||
* Get vacation message for given user
|
||||
*
|
||||
* @param int|string $_euser nummeric account_id or imap username
|
||||
* @param string $_scriptName=null
|
||||
* @param string $_scriptName =null
|
||||
* @throws Exception on connection error or authentication failure
|
||||
* @return array
|
||||
*/
|
||||
|
@ -57,7 +57,7 @@ class emailadmin_imap_dovecot extends emailadmin_imap
|
||||
*
|
||||
* Prefixes adminUsername with real username (separated by an asterisk)
|
||||
*
|
||||
* @param string $_username=null create an admin connection for given user or $this->acc_imap_username
|
||||
* @param string $_username =null create an admin connection for given user or $this->acc_imap_username
|
||||
*/
|
||||
function adminConnection($_username=null)
|
||||
{
|
||||
@ -72,6 +72,29 @@ class emailadmin_imap_dovecot extends emailadmin_imap
|
||||
parent::adminConnection($_username);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create mailbox string from given mailbox-name and user-name
|
||||
*
|
||||
* Admin connection in Dovecot is always for a given user, we can simply use INBOX here.
|
||||
*
|
||||
* @param string $_username
|
||||
* @param string $_folderName =''
|
||||
* @return string utf-7 encoded (done in getMailboxName)
|
||||
*/
|
||||
function getUserMailboxString($_username, $_folderName='')
|
||||
{
|
||||
unset($_username); // not used, but required by function signature
|
||||
|
||||
$mailboxString = 'INBOX';
|
||||
|
||||
if (!empty($_folderName))
|
||||
{
|
||||
$nameSpaces = $this->getNameSpaceArray();
|
||||
$mailboxString .= $nameSpaces['others'][0]['delimiter'] . $_folderName;
|
||||
}
|
||||
return $mailboxString;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an account
|
||||
*
|
||||
@ -190,10 +213,7 @@ class emailadmin_imap_dovecot extends emailadmin_imap
|
||||
{
|
||||
if (isset($this->username)) $bufferUsername = $this->username;
|
||||
if (isset($this->loginName)) $bufferLoginName = $this->loginName;
|
||||
$this->username = $_username;
|
||||
$nameSpaces = $this->getNameSpaces();
|
||||
$mailBoxName = $this->getUserMailboxString($this->username);
|
||||
$this->loginName = str_replace((is_array($nameSpaces)?$nameSpaces['others'][0]['name']:'user/'),'',$mailBoxName); // we need to strip the namespacepart
|
||||
$this->username = $this->loginName = $_username;
|
||||
|
||||
// now disconnect to be able to reestablish the connection with the targetUser while we go on
|
||||
try
|
||||
@ -203,6 +223,7 @@ class emailadmin_imap_dovecot extends emailadmin_imap
|
||||
catch (Exception $e)
|
||||
{
|
||||
// error_log(__METHOD__.__LINE__." Could not establish admin Connection!".$e->getMessage());
|
||||
unset($e);
|
||||
return array();
|
||||
}
|
||||
|
||||
|
@ -341,8 +341,8 @@ class emailadmin_wizard
|
||||
* Step 2: Folder - let user select trash, sent, drafs and template folder
|
||||
*
|
||||
* @param array $content
|
||||
* @param string $msg=''
|
||||
* @param Horde_Imap_Client_Socket $imap=null
|
||||
* @param string $msg =''
|
||||
* @param Horde_Imap_Client_Socket $imap =null
|
||||
*/
|
||||
public function folder(array $content, $msg='', Horde_Imap_Client_Socket $imap=null)
|
||||
{
|
||||
@ -452,7 +452,7 @@ class emailadmin_wizard
|
||||
* Step 3: Sieve
|
||||
*
|
||||
* @param array $content
|
||||
* @param string $msg=''
|
||||
* @param string $msg =''
|
||||
*/
|
||||
public function sieve(array $content, $msg='')
|
||||
{
|
||||
@ -618,7 +618,7 @@ class emailadmin_wizard
|
||||
* Step 4: SMTP
|
||||
*
|
||||
* @param array $content
|
||||
* @param string $msg=''
|
||||
* @param string $msg =''
|
||||
*/
|
||||
public function smtp(array $content, $msg='')
|
||||
{
|
||||
@ -825,9 +825,9 @@ class emailadmin_wizard
|
||||
*
|
||||
* b) via mail_wizard proxy class by regular mail user to edit (acc_id GET parameter) or create new mail account
|
||||
*
|
||||
* @param array $content=null
|
||||
* @param string $msg=''
|
||||
* @param string $msg_type='success'
|
||||
* @param array $content =null
|
||||
* @param string $msg =''
|
||||
* @param string $msg_type ='success'
|
||||
*/
|
||||
public function edit(array $content=null, $msg='', $msg_type='success')
|
||||
{
|
||||
@ -1236,6 +1236,22 @@ class emailadmin_wizard
|
||||
$tpl->setElementAttribute('account_id', 'multiple', true);
|
||||
$readonlys['button[multiple]'] = true;
|
||||
}
|
||||
// when called by admin for existing accounts, display further administrative actions
|
||||
if ($content['called_for'] && $content['acc_id'])
|
||||
{
|
||||
$admin_actions = array();
|
||||
foreach($GLOBALS['egw']->hooks->process(array(
|
||||
'location' => 'emailadmin_edit',
|
||||
'account_id' => $content['called_for'],
|
||||
'acc_id' => $content['acc_id'],
|
||||
)) as $actions)
|
||||
{
|
||||
if ($actions) $admin_actions = array_merge($admin_actions, $actions);
|
||||
}
|
||||
if ($admin_actions) $tpl->setElementAttribute('admin_actions', 'actions', $admin_actions);
|
||||
}
|
||||
$content['admin_actions'] = (bool)$admin_actions;
|
||||
|
||||
$tpl->exec(static::APP_CLASS.'edit', $content, $sel_options, $readonlys, $content, 2);
|
||||
}
|
||||
|
||||
@ -1243,7 +1259,7 @@ class emailadmin_wizard
|
||||
* Replace 0 with '' or back
|
||||
*
|
||||
* @param string|array &$account_id on return always array
|
||||
* @param boolean $back=false
|
||||
* @param boolean $back =false
|
||||
*/
|
||||
private static function fix_account_id_0(&$account_id=null, $back=false)
|
||||
{
|
||||
@ -1263,7 +1279,7 @@ class emailadmin_wizard
|
||||
* Instanciate imap-client
|
||||
*
|
||||
* @param array $content
|
||||
* @param int $timeout=null default use value returned by emailadmin_imap::getTimeOut()
|
||||
* @param int $timeout =null default use value returned by emailadmin_imap::getTimeOut()
|
||||
* @return Horde_Imap_Client_Socket
|
||||
*/
|
||||
protected static function imap_client(array $content, $timeout=null)
|
||||
@ -1302,7 +1318,7 @@ class emailadmin_wizard
|
||||
* therefore we try it with the found MX and it's domain-part (host-name removed).
|
||||
*
|
||||
* @param string $domain domain or email
|
||||
* @param boolean $try_mx=true if domain itself is not found, try mx or domain-part (host removed) of mx
|
||||
* @param boolean $try_mx =true if domain itself is not found, try mx or domain-part (host removed) of mx
|
||||
* @return array with values for keys 'displayName', 'imap', 'smtp', 'pop3', which each contain
|
||||
* array of arrays with values for keys 'hostname', 'port', 'socketType'=(SSL|STARTTLS), 'username'=%EMAILADDRESS%
|
||||
*/
|
||||
@ -1365,7 +1381,7 @@ class emailadmin_wizard
|
||||
* - MX for $domain
|
||||
*
|
||||
* @param string $email email address
|
||||
* @param string $type='imap' 'imap' or 'smtp', used as hostname beside 'mail'
|
||||
* @param string $type ='imap' 'imap' or 'smtp', used as hostname beside 'mail'
|
||||
* @return array of hostname => true pairs
|
||||
*/
|
||||
protected function guess_hosts($email, $type='imap')
|
||||
|
@ -252,6 +252,20 @@ app.classes.emailadmin = AppJS.extend(
|
||||
{
|
||||
var use_default = this.et2.getWidgetById('notify_use_default');
|
||||
if (use_default) use_default.set_value(false);
|
||||
},
|
||||
|
||||
/**
|
||||
* default onExecute for admin actions
|
||||
*
|
||||
* @param {object} _action
|
||||
* @param {object} _senders
|
||||
*/
|
||||
account_edit_action: function(_action, _senders)
|
||||
{
|
||||
if (_action.data.url)
|
||||
{
|
||||
this.egw.open_link(_action.data.url, _action.data.target || '_blank', _action.data.popup);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -268,6 +268,10 @@
|
||||
</hbox>
|
||||
<textbox type="integer" label="Currently:" id="quotaUsed" readonly="true"/>
|
||||
</row>
|
||||
<row disabled="!@admin_actions">
|
||||
<description value="Administration"/>
|
||||
<toolbar id="admin_actions" colspan="2" default_execute="app.emailadmin.account_edit_action"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
|
@ -43,24 +43,19 @@ class mail_acl
|
||||
*/
|
||||
var $mail_bo;
|
||||
|
||||
/**
|
||||
* imap object instanciated in constructor for account to edit
|
||||
*
|
||||
* @var emailadmin_imap
|
||||
*/
|
||||
var $imap;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var mail_account
|
||||
*/
|
||||
var $current_account;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
*
|
||||
*/
|
||||
function __construct()
|
||||
{
|
||||
$acc_id = $_GET['acc_id']?$_GET['acc_id']:$GLOBALS['egw_info']['user']['preferences']['mail']['ActiveProfileID'];
|
||||
$this->mail_bo = mail_bo::getInstance(false, $acc_id);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit folder ACLs of account(s)
|
||||
*
|
||||
@ -70,9 +65,40 @@ class mail_acl
|
||||
*/
|
||||
function edit(array $content=null ,$msg='')
|
||||
{
|
||||
|
||||
$tmpl = new etemplate_new('mail.acl');
|
||||
$mailbox = base64_decode($_GET['mailbox']);
|
||||
if (!is_array($content))
|
||||
{
|
||||
$acc_id = $_GET['acc_id']?$_GET['acc_id']:$GLOBALS['egw_info']['user']['preferences']['mail']['ActiveProfileID'];
|
||||
if (isset($_GET['account_id']) && !isset($GLOBALS['egw_info']['user']['apps']['admin']))
|
||||
{
|
||||
egw_framework::window_close(lang('Permission denied'));
|
||||
}
|
||||
$account_id = $_GET['account_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$acc_id = $content['acc_id'];
|
||||
$account_id = $content['account_id'];
|
||||
}
|
||||
$account = emailadmin_account::read($acc_id, $account_id);
|
||||
$this->imap = $account->imapServer(isset($account_id) ? (int)$account_id : false);
|
||||
|
||||
$mailbox = $_GET['mailbox']? base64_decode($_GET['mailbox']): $content['mailbox'][0];
|
||||
if (empty($mailbox))
|
||||
{
|
||||
$mailbox = $this->imap->isAdminConnection ? $this->imap->getUserMailboxString($this->imap->isAdminConnection) : 'INBOX';
|
||||
}
|
||||
if (!$this->imap->isAdminConnection)
|
||||
{
|
||||
$tmpl->setElementAttribute('mailbox', 'autocomplete_url', 'mail.mail_compose.ajax_searchFolder');
|
||||
}
|
||||
else
|
||||
{
|
||||
//Todo: Implement autocomplete_url function with admin stuffs consideration
|
||||
}
|
||||
// Unset the content if folder is changed, in order to read acl rights for new selected folder
|
||||
if (!is_array($content['button']) && is_array($content['mailbox']) && !is_array($content['grid']['delete'])) unset($content);
|
||||
|
||||
if (!is_array($content))
|
||||
{
|
||||
if (!empty($mailbox))
|
||||
@ -104,9 +130,9 @@ class mail_acl
|
||||
{
|
||||
$content['grid'][$n]['acl'] = 'custom';
|
||||
}
|
||||
if (($account_id = $this->mail_bo->icServer->getMailBoxAccountId($key)))
|
||||
if (($user = $this->imap->getMailBoxAccountId($key)))
|
||||
{
|
||||
$content['grid'][$n++]['acc_id'] = $account_id;
|
||||
$content['grid'][$n++]['acc_id'] = $user;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -143,7 +169,7 @@ class mail_acl
|
||||
$tmpl->set_validation_error('grid['.$row.']'.'[acc_id]', "You must fill this field!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Add new row at the end
|
||||
if ($content['grid'][count($content['grid'])]['acc_id'])
|
||||
array_push($content['grid'], array('acc_id'=>''));
|
||||
@ -180,10 +206,10 @@ class mail_acl
|
||||
//Make the account owner's fields all readonly as owner has all rights and should not be able to change them
|
||||
foreach($content['grid'] as $key => $fields)
|
||||
{
|
||||
if ($fields['acc_id'] == $this->mail_bo->icServer->acc_imap_username ||
|
||||
$fields['acc_id'][0] == $this->mail_bo->icServer->acc_imap_username)
|
||||
if ($fields['acc_id'] == $this->imap->acc_imap_username ||
|
||||
$fields['acc_id'][0] == $this->imap->acc_imap_username)
|
||||
{
|
||||
foreach ($fields as $index => $val)
|
||||
foreach (array_keys($fields) as $index)
|
||||
{
|
||||
$readonlys['grid'][$key][$index] = true;
|
||||
}
|
||||
@ -195,13 +221,60 @@ class mail_acl
|
||||
}
|
||||
//Make entry row's delete button readonly
|
||||
$readonlys['grid']['delete['.count($content['grid']).']'] = true;
|
||||
|
||||
$preserv ['mailbox'] = $content['mailbox'];
|
||||
$content['msg'] = $msg;
|
||||
$content['grid']['account_type'] = $this->mail_bo->icServer->supportsGroupAcl() ? 'both' : 'accounts';
|
||||
|
||||
$preserv['mailbox'] = $content['mailbox'];
|
||||
$preserv['acc_id'] = $acc_id;
|
||||
$preserv['account_id'] = $account_id;
|
||||
$content['grid']['account_type'] = $this->imap->supportsGroupAcl() ? 'both' : 'accounts';
|
||||
|
||||
// set a custom autocomplete method for mailbox taglist
|
||||
if ($account_id)
|
||||
{
|
||||
$tmpl->setElementAttribute('mailbox', 'autocomplete_url', __CLASS__.'::ajax_folders');
|
||||
$tmpl->setElementAttribute('mailbox', 'autocomplete_params', array(
|
||||
'acc_id' => $acc_id,
|
||||
'account_id' => $account_id,
|
||||
));
|
||||
}
|
||||
|
||||
$tmpl->exec('mail.mail_acl.edit', $content, $sel_options, $readonlys, $preserv,2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Autocomplete for folder taglist
|
||||
*
|
||||
* @throws egw_exception_no_permission_admin
|
||||
*/
|
||||
public static function ajax_folders()
|
||||
{
|
||||
if (!empty($_GET['account_id']) && !$GLOBALS['egw_info']['user']['apps']['admin'])
|
||||
{
|
||||
throw new egw_exception_no_permission_admin;
|
||||
}
|
||||
$account = emailadmin_account::read($_GET['acc_id'], $_GET['account_id']);
|
||||
$imap = $account->imapServer(!empty($_GET['account_id']) ? (int)$_GET['account_id'] : false);
|
||||
$mailbox = $imap->isAdminConnection ? $imap->getUserMailboxString($imap->isAdminConnection) : 'INBOX';
|
||||
|
||||
$folders = array();
|
||||
foreach(self::getSubfolders($mailbox, $imap) as $folder)
|
||||
{
|
||||
if (stripos($folder, $_GET['query']) !== false)
|
||||
{
|
||||
$folders[] = array(
|
||||
'id' => $folder,
|
||||
'label' => $folder,
|
||||
);
|
||||
}
|
||||
}
|
||||
// switch regular JSON response handling off
|
||||
egw_json_request::isJSONRequest(false);
|
||||
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
echo json_encode($folders);
|
||||
|
||||
common::egw_exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update ACL rights of a folder or including subfolders for an account(s)
|
||||
*
|
||||
@ -214,7 +287,7 @@ class mail_acl
|
||||
function update_acl ($content, &$msg)
|
||||
{
|
||||
$validator = array();
|
||||
|
||||
|
||||
foreach ($content['grid'] as $keys => $value)
|
||||
{
|
||||
$recursive = $value['acl_recursive'];
|
||||
@ -233,10 +306,10 @@ class mail_acl
|
||||
$options['rights'] .= $right[1];
|
||||
}
|
||||
}
|
||||
$username = $content['grid'][$keys]['acc_id'] == $this->mail_bo->icServer->acc_imap_username
|
||||
$username = $content['grid'][$keys]['acc_id'] == $this->imap->acc_imap_username
|
||||
?$content['grid'][$keys]['acc_id']:$content['grid'][$keys]['acc_id'][0];
|
||||
//error_log(__METHOD__."(".__LINE__.") setACL($content[mailbox], $username, ".array2string($options).", $recursive)");
|
||||
if (is_numeric($username) && ($u = $this->mail_bo->icServer->getMailBoxUserName($username)))
|
||||
if (is_numeric($username) && ($u = $this->imap->getMailBoxUserName($username)))
|
||||
{
|
||||
$username = $u;
|
||||
}
|
||||
@ -245,12 +318,12 @@ class mail_acl
|
||||
//error_log(__METHOD__."() setACL($content[mailbox], $username, ".array2string($options).", $recursive)");
|
||||
if (($ret=$this->setACL($content['mailbox'], $username, $options, $recursive, $msg)))
|
||||
{
|
||||
$msg = lang("The Folder %1 's ACLs saved!", $content['mailbox']);
|
||||
|
||||
$msg = lang("The Folder %1 's ACLs saved", $content['mailbox']);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg = lang('Error while setting folder '.$content['mailbox']. $msg);
|
||||
$msg = lang('Error while setting ACL for folder %1!', $content['mailbox']).' '.$msg;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -265,7 +338,7 @@ class mail_acl
|
||||
if (is_array($validator))
|
||||
{
|
||||
return $validator;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -276,7 +349,7 @@ class mail_acl
|
||||
{
|
||||
if (($acl = $this->getACL($mailbox)))
|
||||
{
|
||||
$msg = lang('ACL rights retrived successfully!');
|
||||
$msg = lang('ACL rights retrived successfully');
|
||||
return $acl;
|
||||
}
|
||||
else
|
||||
@ -301,7 +374,8 @@ class mail_acl
|
||||
if ($row_num) $row_num = $row_num[0];
|
||||
$recursive = $content['grid'][$row_num]['acl_recursive'];
|
||||
$identifier = $content['grid'][$row_num]['acc_id'][0];
|
||||
if (is_numeric($identifier) && ($u = $this->mail_bo->icServer->getMailBoxUserName($identifier)))
|
||||
if (is_array($content['mailbox'])) $content['mailbox'] = $content['mailbox'][0];
|
||||
if (is_numeric($identifier) && ($u = $this->imap->getMailBoxUserName($identifier)))
|
||||
{
|
||||
$identifier = $u;
|
||||
}
|
||||
@ -312,18 +386,18 @@ class mail_acl
|
||||
unset($content['grid']['delete']);
|
||||
if ($recursive)
|
||||
{
|
||||
$msg = lang("The %1 's acl, including its subfolders, removed from the %2!",$content['mailbox'],$identifier);
|
||||
$msg = lang("The %1 's acl, including its subfolders, removed from the %2",$content['mailbox'],$identifier);
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg = lang("The %1 's acl removed from the %2!",$content['mailbox'],$identifier);
|
||||
$msg = lang("The %1 's acl removed from the %2",$content['mailbox'],$identifier);
|
||||
}
|
||||
|
||||
return array_combine(range(1, count($content['grid'])), array_values($content['grid']));
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg = lang("An error happend while trying to remove ACL rights from the account %1.",$identifier);
|
||||
$msg = lang("An error happend while trying to remove ACL rights from the account %1!",$identifier);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -342,7 +416,7 @@ class mail_acl
|
||||
{
|
||||
if ($recursive)
|
||||
{
|
||||
$folders = $this->getSubfolders($mailbox);
|
||||
$folders = self::getSubfolders($mailbox, $this->imap);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -352,7 +426,7 @@ class mail_acl
|
||||
{
|
||||
try
|
||||
{
|
||||
$this->mail_bo->icServer->deleteACL($sbFolders, $identifier);
|
||||
$this->imap->deleteACL($sbFolders, $identifier);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
@ -367,16 +441,15 @@ class mail_acl
|
||||
* Get subfolders of a mailbox
|
||||
*
|
||||
* @param string $mailbox structural folder name
|
||||
*
|
||||
* @param emailadmin_imap $imap
|
||||
* @return Array an array including all subfolders of given mailbox| returns an empty array in case of no subfolders
|
||||
*
|
||||
*/
|
||||
function getSubfolders($mailbox)
|
||||
protected static function getSubfolders($mailbox, emailadmin_imap $imap)
|
||||
{
|
||||
$delimiter = $this->mail_bo->getHierarchyDelimiter();
|
||||
$nameSpace = $this->mail_bo->_getNameSpaces();
|
||||
$prefix = $this->mail_bo->getFolderPrefixFromNamespace($nameSpace, $mailbox);
|
||||
if (($subFolders = $this->mail_bo->getMailBoxesRecursive($mailbox, $delimiter, $prefix)))
|
||||
$delimiter = $imap->getDelimiter();
|
||||
$nameSpace = $imap->getNameSpace();
|
||||
$prefix = $imap->getFolderPrefixFromNamespace($nameSpace, $mailbox);
|
||||
if (($subFolders = $imap->getMailBoxesRecursive($mailbox, $delimiter, $prefix)))
|
||||
{
|
||||
return $subFolders;
|
||||
}
|
||||
@ -404,7 +477,7 @@ class mail_acl
|
||||
{
|
||||
if ($recursive)
|
||||
{
|
||||
$folders = $this->getSubfolders($mailbox);
|
||||
$folders = self::getSubfolders($mailbox, $this->imap);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -414,7 +487,7 @@ class mail_acl
|
||||
{
|
||||
try
|
||||
{
|
||||
$this->mail_bo->icServer->setACL($sbFolders,$identifier,$options);
|
||||
$this->imap->setACL($sbFolders,$identifier,$options);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
@ -436,7 +509,7 @@ class mail_acl
|
||||
{
|
||||
try
|
||||
{
|
||||
$acl = $this->mail_bo->icServer->getACL($mailbox);
|
||||
$acl = $this->imap->getACL($mailbox);
|
||||
return $acl;
|
||||
} catch (Exception $e) {
|
||||
error_log(__METHOD__. "Could not get ACL rights from folder " . $mailbox . " because of " .$e->getMessage());
|
||||
|
@ -18,40 +18,50 @@ class mail_hooks
|
||||
/**
|
||||
* Hook to add context menu entries to user list
|
||||
*
|
||||
* @param array $data
|
||||
* @param array $data values for keys account_id and acc_id
|
||||
*/
|
||||
static function edit_user($data)
|
||||
static function emailadmin_edit($data)
|
||||
{
|
||||
unset($data); // not used, but required by function signature
|
||||
$actions = array();
|
||||
|
||||
$have_imap_admin_and_sieve = false;
|
||||
// list all mail accounts
|
||||
foreach(emailadmin_account::search(false, 'params', null, false, 0, false) as $params)
|
||||
{
|
||||
// check if account is valid for multiple users, has admin credentials and sieve enabled
|
||||
if (emailadmin_account::is_multiple($params) &&
|
||||
$params['acc_imap_admin_username'] && $params['acc_sieve_enabled'] ||
|
||||
$params['acc_imap_type'] == 'managementserver_imap')
|
||||
{
|
||||
$have_imap_admin_and_sieve = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$user_actions = array();
|
||||
|
||||
if ($have_imap_admin_and_sieve) // add action to set vacation notice for a user
|
||||
$account = emailadmin_account::read($data['acc_id'], $data['account_id']);
|
||||
if (emailadmin_account::is_multiple($account) && $account['acc_imap_admin_username'] ||
|
||||
$account['acc_imap_type'] == 'managementserver_imap')
|
||||
{
|
||||
translation::add_app('mail');
|
||||
|
||||
$user_actions[] = array (
|
||||
'id' => 'mail_vacation',
|
||||
'caption' => 'Vacation notice',
|
||||
'popup' => '750x420',
|
||||
'url' => 'menuaction=mail.mail_sieve.editVacation&account_id=$id',
|
||||
'allowMultiple' => false,
|
||||
);
|
||||
if (true /* ToDo check ACL available */ || $account['acc_imap_type'] == 'managementserver_imap')
|
||||
{
|
||||
$actions[] = array (
|
||||
'id' => 'mail_acl',
|
||||
'caption' => 'Folder ACL',
|
||||
'icon' => 'lock',
|
||||
'popup' => '750x420',
|
||||
'url' => egw::link('/index.php', array(
|
||||
'menuaction' => 'mail.mail_acl.edit',
|
||||
'acc_id' => $data['acc_id'],
|
||||
'account_id' => $data['account_id'],
|
||||
)),
|
||||
'toolbarDefault' => true,
|
||||
);
|
||||
}
|
||||
if ($account['acc_sieve_enabled'] || $account['acc_imap_type'] == 'managementserver_imap')
|
||||
{
|
||||
$actions[] = array (
|
||||
'id' => 'mail_vacation',
|
||||
'caption' => 'Vacation notice',
|
||||
'icon' => 'mail/navbar',
|
||||
'popup' => '750x420',
|
||||
'url' => egw::link('/index.php', array(
|
||||
'menuaction' => 'mail.mail_sieve.editVacation',
|
||||
'acc_id' => $data['acc_id'],
|
||||
'account_id' => $data['account_id'],
|
||||
)),
|
||||
'toolbarDefault' => true,
|
||||
);
|
||||
}
|
||||
}
|
||||
return $user_actions;
|
||||
return $actions;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -481,17 +481,27 @@ class mail_sieve
|
||||
{
|
||||
foreach(emailadmin_account::search($account_id, false, null, false, 0, false) as $account)
|
||||
{
|
||||
// check if account is valid for multiple users, has admin credentials and sieve enabled
|
||||
if (emailadmin_account::is_multiple($account) &&
|
||||
($icServer = $account->imapServer(true)) && // check on icServer object, so plugins can overwrite
|
||||
$icServer->acc_imap_admin_username && $icServer->acc_sieve_enabled)
|
||||
{
|
||||
$allAccounts[$account->acc_id] = $account->acc_name;
|
||||
$accounts[$account->acc_id] = $account;
|
||||
try {
|
||||
// check if account is valid for multiple users, has admin credentials and sieve enabled
|
||||
if (emailadmin_account::is_multiple($account) &&
|
||||
($icServer = $account->imapServer(true)) && // check on icServer object, so plugins can overwrite
|
||||
$icServer->acc_imap_admin_username && $icServer->acc_sieve_enabled)
|
||||
{
|
||||
$allAccounts[$account->acc_id] = $account->acc_name;
|
||||
$accounts[$account->acc_id] = $account;
|
||||
}
|
||||
}
|
||||
catch(Exception $e) {
|
||||
unset($e);
|
||||
// ignore broken accounts
|
||||
}
|
||||
}
|
||||
|
||||
$profileID = !isset($content['acc_id']) ? key($accounts):$content['acc_id'];
|
||||
if (isset($_GET['acc_id']) && isset($allAccounts[$_GET['acc_id']]))
|
||||
{
|
||||
$profileID = $content['acc_id'] = (int)$_GET['acc_id'];
|
||||
}
|
||||
|
||||
//Chooses the right account
|
||||
$this->account = $accounts[$profileID];
|
||||
@ -624,7 +634,7 @@ class mail_sieve
|
||||
$cachedVacations = egw_cache::getCache(egw_cache::INSTANCE, 'email', 'vacationNotice'.$GLOBALS['egw_info']['user']['account_lid']);
|
||||
$cachedVacations = array($icServer->acc_id => $newVacation) + (array)$cachedVacations;
|
||||
egw_cache::setCache(egw_cache::INSTANCE,'email', 'vacationNotice'.$GLOBALS['egw_info']['user']['account_lid'], $cachedVacations);
|
||||
|
||||
|
||||
$msg = lang('Vacation notice sucessfully updated.');
|
||||
}
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ app.classes.mail = AppJS.extend(
|
||||
});
|
||||
/*Trigger compose_resizeHandler after the CKEditor is fully loaded*/
|
||||
jQuery('#mail-compose').on ('load',function() {
|
||||
window.setTimeout(function(){that.compose_resizeHandler()}, 100);
|
||||
window.setTimeout(function(){that.compose_resizeHandler();}, 100);
|
||||
});
|
||||
|
||||
this.compose_fieldExpander();
|
||||
@ -3581,7 +3581,23 @@ app.classes.mail = AppJS.extend(
|
||||
var folder = mailbox[1] || 'INBOX', acc_id = mailbox[0];
|
||||
this.egw.open_link('mail.mail_acl.edit&mailbox='+ jQuery.base64Encode(folder)+'&acc_id='+acc_id, '_blank', '640x480');
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Submit new selected folder back to server in order to read its acl's rights
|
||||
*/
|
||||
acl_folderChange: function ()
|
||||
{
|
||||
var mailbox = this.et2.getWidgetById('mailbox');
|
||||
|
||||
if (mailbox)
|
||||
{
|
||||
if (mailbox.taglist.getValue().length > 0)
|
||||
{
|
||||
this.et2._inst.submit();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Edit a mail account
|
||||
*
|
||||
|
@ -30,7 +30,7 @@ allow images from external sources in html emails mail de Erlaube Bilder von ext
|
||||
allow users to create further identities mail de Anwender dürfen weitere Identitäten hinzufügen
|
||||
allways a new window mail de immer in einem neuen Fenster
|
||||
always show html emails mail de HTML-E-Mails immer anzeigen
|
||||
an error happend while trying to remove acl rights from the account %1. mail de Ein Fehler trat auf beim Versuch die Zugriffskontrollrechte vom Konto %1 zu entfernen.
|
||||
an error happend while trying to remove acl rights from the account %1! mail de Ein Fehler trat auf beim Versuch die Zugriffskontrollrechte vom Konto %1 zu entfernen!
|
||||
and the rule with priority %1, now got the priority %2 mail de Die Regel mit Priorität %1 hat jetzt die Priorität %2
|
||||
any of mail de mit einem
|
||||
any status mail de Alle Status
|
||||
@ -97,6 +97,7 @@ do not auto create folders mail de Automatische Ordnererstellung verhindern für
|
||||
do you really want to apply %1 to all messages in the current view? mail de Wollen Sie wirklich %1 auf alle Nachrichten in der aktuellen Ansicht anwenden?
|
||||
do you really want to delete folder %1 ? mail de Wollen Sie den Ordner %1 wirklich löschen?
|
||||
do you really want to mark all messages as read in the current folder? mail de Wollen Sie wirklich alle eMails im aktuellen Ordner als gelesen markieren?
|
||||
do you really want to remove all rights from this account mail de Wollen Sie wirklich alle Rechte von diesem Benutzer löschen
|
||||
do you really want to toggle flag %1 for all messages in current view? mail de Wollen Sie wirklich den Wert für %1 für alle Nachrichten in der aktuellen Ansicht umschalten?
|
||||
do you want to be asked for confirmation before attaching selected messages to new mail? mail de Möchten Sie vor dem Anhängen von einer oder mehreren (ausgewählten) E-Mails an eine neue E-Mail gefragt werden?
|
||||
do you want to be asked for confirmation before moving selected messages to another folder? mail de Möchten Sie vor dem Verschieben von E-Mails in andere Ordner gefragt werden?
|
||||
@ -407,9 +408,9 @@ test connection and display basic information about the selected profile mail de
|
||||
text mail de Text
|
||||
text mode mail de Text Modus
|
||||
text/plain mail de text/plain
|
||||
the %1 's acl removed from the %2! mail de Die Zugriffskontrollrechte von %1 wurden von %2 entfernt!
|
||||
the %1 's acl, including its subfolders, removed from the %2! mail de Die Zugriffskontrollrechte inkl. Unterordner von %1 wurden von %2 entfernt!
|
||||
the folder %1 's acls saved! mail de Die Zugriffskontrollrechte des Ordners %1 wurden gespeichert!
|
||||
the %1 's acl removed from the %2 mail de Die Zugriffskontrollrechte von %1 wurden von %2 entfernt
|
||||
the %1 's acl, including its subfolders, removed from the %2 mail de Die Zugriffskontrollrechte inkl. Unterordner von %1 wurden von %2 entfernt
|
||||
the folder %1 's acls saved mail de Die Zugriffskontrollrechte des Ordners %1 wurden gespeichert
|
||||
the folder <b>%1</b> will be used, if there is nothing set here, and no valid predefine given. mail de Der Ordner <b>%1</b> wird verwendet, wenn hier nichts gesetzt ist und kein gültiger Vorgabewert eingetragen ist.
|
||||
the message sender has requested a response to indicate that you have read this message. would you like to send a receipt? mail de Der Absender hat ein Empfangsbestätigung angefordert, um sicherzustellen, das Sie diese E-Mail gelesen haben. Möchten Sie ein Empfangsbestätigung senden?
|
||||
the mimeparser can not parse this message. mail de Der MIME Parser versteht diese Nachricht nicht.
|
||||
|
@ -30,7 +30,7 @@ allow images from external sources in html emails mail en allow images from exte
|
||||
allow users to create further identities mail en allow users to create further identities
|
||||
allways a new window mail en allways a new window
|
||||
always show html emails mail en always show html emails
|
||||
an error happend while trying to remove acl rights from the account %1. mail en An error happend while trying to remove ACL rights from the account %1.
|
||||
an error happend while trying to remove acl rights from the account %1! mail en An error happend while trying to remove ACL rights from the account %1!
|
||||
and the rule with priority %1, now got the priority %2 mail en And the rule with priority %1, now got the priority %2
|
||||
any of mail en any of
|
||||
any status mail en any status
|
||||
@ -97,6 +97,7 @@ do not auto create folders mail en do not auto create folders
|
||||
do you really want to apply %1 to all messages in the current view? mail en Do you really want to apply %1 to ALL messages in the current view?
|
||||
do you really want to delete folder %1 ? mail en Do you really want to DELETE Folder %1 ?
|
||||
do you really want to mark all messages as read in the current folder? mail en Do you really want to mark ALL messages as read in the current folder?
|
||||
do you really want to remove all rights from this account mail en Do you really want to remove all rights from this account
|
||||
do you really want to toggle flag %1 for all messages in current view? mail en Do you really want to toggle flag %1 for ALL messages in current view?
|
||||
do you want to be asked for confirmation before attaching selected messages to new mail? mail en Do you want to be asked for confirmation before attaching selected messages to new mail?
|
||||
do you want to be asked for confirmation before moving selected messages to another folder? mail en Do you want to be asked for confirmation before moving selected messages to another folder?
|
||||
@ -409,9 +410,9 @@ test connection and display basic information about the selected profile mail en
|
||||
text mail en Text
|
||||
text mode mail en Text mode
|
||||
text/plain mail en text/plain
|
||||
the %1 's acl removed from the %2! mail en The %1 's acl removed from the %2!
|
||||
the %1 's acl, including its subfolders, removed from the %2! mail en The %1 's acl, including its subfolders, removed from the %2!
|
||||
the folder %1 's acls saved! mail en The Folder %1 's ACLs saved!
|
||||
the %1 's acl removed from the %2 mail en The %1 's acl removed from the %2
|
||||
the %1 's acl, including its subfolders, removed from the %2 mail en The %1 's acl, including its subfolders, removed from the %2
|
||||
the folder %1 's acls saved mail en The Folder %1 's ACLs saved
|
||||
the folder <b>%1</b> will be used, if there is nothing set here, and no valid predefine given. mail en The folder <b>%1</b> will be used, if there is nothing set here, and no valid predefine given.
|
||||
the message sender has requested a response to indicate that you have read this message. would you like to send a receipt? mail en The message sender has requested a response to indicate that you have read this message. Would you like to send a receipt?
|
||||
the mimeparser can not parse this message. mail en The mimeparser can not parse this message.
|
||||
|
@ -36,7 +36,7 @@ $setup_info['mail']['hooks']['session_creation'] = 'mail_bo::resetConnectionErro
|
||||
$setup_info['mail']['hooks']['verify_settings'] = 'mail_bo::forcePrefReload';
|
||||
$setup_info['mail']['hooks']['clear_cache'] = 'mail_bo::unsetCachedObjects';
|
||||
$setup_info['mail']['hooks']['check_notify'] = 'mail_hooks::notification_check_mailbox';
|
||||
$setup_info['mail']['hooks']['edit_user'] = 'mail_hooks::edit_user';
|
||||
$setup_info['mail']['hooks']['emailadmin_edit'] = 'mail_hooks::emailadmin_edit';
|
||||
|
||||
/*
|
||||
$setup_info['mail']['hooks'][] = 'home';
|
||||
|
@ -2,71 +2,83 @@
|
||||
<!-- $Id$ -->
|
||||
<overlay>
|
||||
<template id="mail.acl" template="" lang="" group="0" version="1.9.001">
|
||||
<vbox>
|
||||
<hbox>
|
||||
<description id="msg" class="message"/>
|
||||
</hbox>
|
||||
<vbox >
|
||||
<description id="mailbox" align="center"/>
|
||||
</vbox>
|
||||
<grid id="grid">
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row class="th dialogHeader">
|
||||
<description value="Name"/>
|
||||
<description value="Common ACL"/>
|
||||
<description align="center" value="L"/>
|
||||
<description align="center" value="R"/>
|
||||
<description align="center" value="S"/>
|
||||
<description align="center" value="W"/>
|
||||
<description align="center" value="I"/>
|
||||
<description align="center" value="P"/>
|
||||
<description align="center" value="C"/>
|
||||
<description align="center" value="D"/>
|
||||
<description align="center" value="A"/>
|
||||
<description align="center" value="Recursively"/>
|
||||
<description value="Action"/>
|
||||
</row>
|
||||
<row class="row">
|
||||
<taglist-account id="${row}[acc_id]" allowFreeEntries="true" maxSelection="1" account_type="@account_type" />
|
||||
<menulist>
|
||||
<menupopup id="${row}[acl]" onchange="app.mail.acl_common_rights_selector"/>
|
||||
</menulist>
|
||||
<checkbox align="center" id="${row}[acl_l]" onchange="app.mail.acl_common_rights"/>
|
||||
<checkbox align="center" id="${row}[acl_r]" onchange="app.mail.acl_common_rights"/>
|
||||
<checkbox align="center" id="${row}[acl_s]" onchange="app.mail.acl_common_rights"/>
|
||||
<checkbox align="center" id="${row}[acl_w]" onchange="app.mail.acl_common_rights"/>
|
||||
<checkbox align="center" id="${row}[acl_i]" onchange="app.mail.acl_common_rights"/>
|
||||
<checkbox align="center" id="${row}[acl_p]" onchange="app.mail.acl_common_rights"/>
|
||||
<checkbox align="center" id="${row}[acl_c]" onchange="app.mail.acl_common_rights"/>
|
||||
<checkbox align="center" id="${row}[acl_d]" onchange="app.mail.acl_common_rights"/>
|
||||
<checkbox align="center" id="${row}[acl_a]" onchange="app.mail.acl_common_rights"/>
|
||||
<checkbox align="center" id="${row}[acl_recursive]"/>
|
||||
<hbox orient=",0,0">
|
||||
<button align="right" statustext="Delete this ACL" label="Delete" id="delete[${row}]" value="${row}" image="delete" onclick="et2_dialog.confirm(widget,'Do you really want to remove all rights from this account','Remove')"/>
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<hbox class="dialogFooterToolbar">
|
||||
<button statustext="Saves this ACL" label="Save" id="button[save]"/>
|
||||
<button statustext="Applies the changes made" label="Apply" id="button[apply]"/>
|
||||
<button label="Cancel" id="button[cancel]"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column width="10%"/>
|
||||
<column width="90%"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row class="dialogHeader">
|
||||
<description value="Mail ACL" />
|
||||
</row>
|
||||
<row>
|
||||
<description value="Folder:"/>
|
||||
<taglist id="mailbox" width="100%" autocomplete_url='mail.mail_compose.ajax_searchFolder' maxSelection="1" autocomplete_params='' allowFreeEntries="false" onchange='app.mail.acl_folderChange'/>
|
||||
</row>
|
||||
<row>
|
||||
<description value="Rights:"/>
|
||||
<grid id="grid" width="100%">
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row class="th">
|
||||
<description value="Name"/>
|
||||
<description value="Common ACL"/>
|
||||
<description align="center" value="L"/>
|
||||
<description align="center" value="R"/>
|
||||
<description align="center" value="S"/>
|
||||
<description align="center" value="W"/>
|
||||
<description align="center" value="I"/>
|
||||
<description align="center" value="P"/>
|
||||
<description align="center" value="C"/>
|
||||
<description align="center" value="D"/>
|
||||
<description align="center" value="A"/>
|
||||
<description align="center" value="Recursively"/>
|
||||
<description value="Action"/>
|
||||
</row>
|
||||
<row class="row">
|
||||
<taglist-account id="${row}[acc_id]" allowFreeEntries="true" maxSelection="1" account_type="@account_type" />
|
||||
<menulist>
|
||||
<menupopup id="${row}[acl]" onchange="app.mail.acl_common_rights_selector"/>
|
||||
</menulist>
|
||||
<checkbox align="center" id="${row}[acl_l]" onchange="app.mail.acl_common_rights"/>
|
||||
<checkbox align="center" id="${row}[acl_r]" onchange="app.mail.acl_common_rights"/>
|
||||
<checkbox align="center" id="${row}[acl_s]" onchange="app.mail.acl_common_rights"/>
|
||||
<checkbox align="center" id="${row}[acl_w]" onchange="app.mail.acl_common_rights"/>
|
||||
<checkbox align="center" id="${row}[acl_i]" onchange="app.mail.acl_common_rights"/>
|
||||
<checkbox align="center" id="${row}[acl_p]" onchange="app.mail.acl_common_rights"/>
|
||||
<checkbox align="center" id="${row}[acl_c]" onchange="app.mail.acl_common_rights"/>
|
||||
<checkbox align="center" id="${row}[acl_d]" onchange="app.mail.acl_common_rights"/>
|
||||
<checkbox align="center" id="${row}[acl_a]" onchange="app.mail.acl_common_rights"/>
|
||||
<checkbox align="center" id="${row}[acl_recursive]"/>
|
||||
<hbox orient=",0,0">
|
||||
<button align="right" statustext="Delete this ACL" label="Delete" id="delete[${row}]" value="${row}" image="delete" onclick="et2_dialog.confirm(widget,'Do you really want to remove all rights from this account','Remove')"/>
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</row>
|
||||
<row>
|
||||
<hbox class="dialogFooterToolbar">
|
||||
<button statustext="Saves this ACL" label="Save" id="button[save]"/>
|
||||
<button statustext="Applies the changes made" label="Apply" id="button[apply]"/>
|
||||
<button label="Cancel" id="button[cancel]"/>
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
</overlay>
|
Loading…
Reference in New Issue
Block a user