diff --git a/data/web/inc/functions.mailbox.inc.php b/data/web/inc/functions.mailbox.inc.php index 457b53d60..46658274e 100644 --- a/data/web/inc/functions.mailbox.inc.php +++ b/data/web/inc/functions.mailbox.inc.php @@ -1027,10 +1027,10 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) { } $template_attr = null; if ($_data['template']){ - $template_attr = mailbox('get', 'mailbox_templates', $_data['template'])['attributes']; + $template_attr = mailbox('get', 'mailbox_templates', $_data['template'], $_extra)['attributes']; } if (empty($template_attr)) { - $template_attr = mailbox('get', 'mailbox_templates')[0]['attributes']; + $template_attr = mailbox('get', 'mailbox_templates', null, $_extra)[0]['attributes']; } $MAILBOX_DEFAULT_ATTRIBUTES = array_merge($MAILBOX_DEFAULT_ATTRIBUTES, $template_attr); @@ -4711,7 +4711,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) { return $mailboxdata; break; case 'mailbox_templates': - if ($_SESSION['mailcow_cc_role'] != "admin" && $_SESSION['mailcow_cc_role'] != "domainadmin") { + if ($_SESSION['mailcow_cc_role'] != "admin" && $_SESSION['mailcow_cc_role'] != "domainadmin" && !$_extra['iam_create_login']) { return false; } $_data = (isset($_data)) ? intval($_data) : null; diff --git a/data/web/templates/index.twig b/data/web/templates/index.twig index 98847d53e..3c752b132 100644 --- a/data/web/templates/index.twig +++ b/data/web/templates/index.twig @@ -40,7 +40,7 @@ -