[Web] fix extend_sender_acl issue for domainadmins
This commit is contained in:
parent
fc0e6b6efb
commit
dd9296ffc2
@ -2879,10 +2879,10 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
|||||||
$_SESSION['return'][] = array(
|
$_SESSION['return'][] = array(
|
||||||
'type' => 'danger',
|
'type' => 'danger',
|
||||||
'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
|
'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
|
||||||
'msg' => 'access_denied'
|
'msg' => 'extended_sender_acl_denied'
|
||||||
);
|
);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
$extra_acls = array_map('trim', preg_split( "/( |,|;|\n)/", $_data['extended_sender_acl']));
|
$extra_acls = array_map('trim', preg_split( "/( |,|;|\n)/", $_data['extended_sender_acl']));
|
||||||
foreach ($extra_acls as $i => &$extra_acl) {
|
foreach ($extra_acls as $i => &$extra_acl) {
|
||||||
if (empty($extra_acl)) {
|
if (empty($extra_acl)) {
|
||||||
@ -2942,6 +2942,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (isset($_data['sender_acl'])) {
|
if (isset($_data['sender_acl'])) {
|
||||||
// Get sender_acl items set by admin
|
// Get sender_acl items set by admin
|
||||||
$sender_acl_admin = array_merge(
|
$sender_acl_admin = array_merge(
|
||||||
|
@ -363,6 +363,7 @@
|
|||||||
"domain_not_empty": "Domain %s ist nicht leer",
|
"domain_not_empty": "Domain %s ist nicht leer",
|
||||||
"domain_not_found": "Domain %s nicht gefunden",
|
"domain_not_found": "Domain %s nicht gefunden",
|
||||||
"domain_quota_m_in_use": "Domain-Speicherplatzlimit muss größer oder gleich %d MiB sein",
|
"domain_quota_m_in_use": "Domain-Speicherplatzlimit muss größer oder gleich %d MiB sein",
|
||||||
|
"extended_sender_acl_denied": "Keine Rechte zum setzen von externen Absenderadressen",
|
||||||
"extra_acl_invalid": "Externe Absenderadresse \"%s\" ist ungültig",
|
"extra_acl_invalid": "Externe Absenderadresse \"%s\" ist ungültig",
|
||||||
"extra_acl_invalid_domain": "Externe Absenderadresse \"%s\" verwendet eine ungültige Domain",
|
"extra_acl_invalid_domain": "Externe Absenderadresse \"%s\" verwendet eine ungültige Domain",
|
||||||
"fido2_verification_failed": "FIDO2-Verifizierung fehlgeschlagen: %s",
|
"fido2_verification_failed": "FIDO2-Verifizierung fehlgeschlagen: %s",
|
||||||
|
@ -363,6 +363,7 @@
|
|||||||
"domain_not_empty": "Cannot remove non-empty domain %s",
|
"domain_not_empty": "Cannot remove non-empty domain %s",
|
||||||
"domain_not_found": "Domain %s not found",
|
"domain_not_found": "Domain %s not found",
|
||||||
"domain_quota_m_in_use": "Domain quota must be greater or equal to %s MiB",
|
"domain_quota_m_in_use": "Domain quota must be greater or equal to %s MiB",
|
||||||
|
"extended_sender_acl_denied": "missing ACL to set external sender addresses",
|
||||||
"extra_acl_invalid": "External sender address \"%s\" is invalid",
|
"extra_acl_invalid": "External sender address \"%s\" is invalid",
|
||||||
"extra_acl_invalid_domain": "External sender \"%s\" uses an invalid domain",
|
"extra_acl_invalid_domain": "External sender \"%s\" uses an invalid domain",
|
||||||
"fido2_verification_failed": "FIDO2 verification failed: %s",
|
"fido2_verification_failed": "FIDO2 verification failed: %s",
|
||||||
|
@ -200,8 +200,10 @@
|
|||||||
{% if sender_acl_handles.external_sender_aliases %}
|
{% if sender_acl_handles.external_sender_aliases %}
|
||||||
{% set ext_sender_acl = sender_acl_handles.external_sender_aliases|join(', ') %}
|
{% set ext_sender_acl = sender_acl_handles.external_sender_aliases|join(', ') %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if acl.extend_sender_acl and acl.extend_sender_acl == 1 %}
|
||||||
<input type="text" class="form-control" name="extended_sender_acl" value="{{ ext_sender_acl }}" placeholder="user1@example.com, user2@example.org, @example.com, ...">
|
<input type="text" class="form-control" name="extended_sender_acl" value="{{ ext_sender_acl }}" placeholder="user1@example.com, user2@example.org, @example.com, ...">
|
||||||
<small class="text-muted">{{ lang.edit.extended_sender_acl_info|raw }}</small>
|
<small class="text-muted">{{ lang.edit.extended_sender_acl_info|raw }}</small>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
Loading…
Reference in New Issue
Block a user