* Admin/EMail: allow admins to always add arbitrary aliases, even if not allowed for regular user

This commit is contained in:
Ralf Becker 2017-07-12 18:42:30 +02:00
parent de91dc2a2a
commit 79c1d2e41c
2 changed files with 5 additions and 3 deletions

View File

@ -1230,13 +1230,15 @@ class admin_mail
$sel_options['acc_further_identities'] = self::$further_identities;
// if only aliases are allowed for futher identities, add them as options
if ($content['acc_further_identities'] == 2)
// allow admins to always add arbitrary aliases
if ($content['acc_further_identities'] == 2 && !$this->is_admin)
{
$sel_options['ident_email_alias'] = array_merge(
array('' => $content['mailLocalAddress'].' ('.lang('Default').')'),
array_combine($content['mailAlternateAddress'], $content['mailAlternateAddress']));
// copy ident_email to select-box ident_email_alias, as et2 requires unique ids
$content['ident_email_alias'] = $content['ident_email'];
$content['select_ident_mail'] = true;
}
// user is allowed to create or edit further identities

View File

@ -30,11 +30,11 @@
<description for="ident_org" value="Organisation"/>
<textbox id="ident_org" size="90" maxlength="128" span="all"/>
</row>
<row disabled="@acc_further_identities=2">
<row disabled="@select_ident_mail">
<description for="ident_email" value="EMail address"/>
<url-email id="ident_email" size="90" maxlength="128" span="all"/>
</row>
<row disabled="!@acc_further_identities=2">
<row disabled="!@selec_ident_mail">
<description for="ident_email_alias" value="EMail address"/>
<select id="ident_email_alias" span="all" class="et2_fullWidth"/>
</row>