1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2025-12-13 09:56:01 +00:00

[DockerApi] rework doveadm__get_acl function

This commit is contained in:
FreddleSpl0it
2024-08-23 09:30:23 +02:00
parent be5a181be5
commit 8e7b27aae4
2 changed files with 35 additions and 25 deletions

View File

@@ -3249,15 +3249,15 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
// get imap acls
$exec_fields = array(
'cmd' => 'dovecot',
'cmd' => 'doveadm',
'task' => 'get_acl',
'maildir' => $domain . '/' . $old_local_part,
'id' => $old_username
);
$imap_acls = json_decode(docker('post', 'dovecot-mailcow', 'exec', $exec_fields), true);
// delete imap acls
foreach ($imap_acls as $imap_acl) {
$exec_fields = array(
'cmd' => 'dovecot',
'cmd' => 'doveadm',
'task' => 'delete_acl',
'user' => $imap_acl['user'],
'mailbox' => $imap_acl['mailbox'],
@@ -3348,7 +3348,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
// set imap acls
foreach ($imap_acls as $imap_acl) {
$exec_fields = array(
'cmd' => 'dovecot',
'cmd' => 'doveadm',
'task' => 'set_acl',
'user' => $imap_acl['user'],
'mailbox' => $imap_acl['mailbox'],