From 9a4b79a6296452a8cf2c9365b4a245bc4ecef5d5 Mon Sep 17 00:00:00 2001 From: FreddleSpl0it Date: Mon, 5 Feb 2024 17:11:36 +0100 Subject: [PATCH] [Web] fix idp mailbox login --- data/web/inc/functions.mailbox.inc.php | 6 +++--- data/web/templates/index.twig | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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 @@ -
+