From 17b6ac331305e9f4a9b81c144969263c15f6a47d Mon Sep 17 00:00:00 2001 From: FreddleSpl0it Date: Fri, 28 Jul 2023 15:36:48 +0200 Subject: [PATCH] [Web] allow mailbox authsource to be switchable --- data/web/edit.php | 4 +++- data/web/templates/edit/mailbox.twig | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/data/web/edit.php b/data/web/edit.php index 83ae1467e0..f13bc28d2b 100644 --- a/data/web/edit.php +++ b/data/web/edit.php @@ -118,6 +118,7 @@ $quarantine_category = mailbox('get', 'quarantine_category', $mailbox); $get_tls_policy = mailbox('get', 'tls_policy', $mailbox); $rlyhosts = relayhost('get'); + $iam_settings = identity_provider('get'); $template = 'edit/mailbox.twig'; $template_data = [ 'acl' => $_SESSION['acl'], @@ -130,7 +131,8 @@ 'rlyhosts' => $rlyhosts, 'sender_acl_handles' => mailbox('get', 'sender_acl_handles', $mailbox), 'user_acls' => acl('get', 'user', $mailbox), - 'mailbox_details' => $result + 'mailbox_details' => $result, + 'iam_settings' => $iam_settings, ]; } } diff --git a/data/web/templates/edit/mailbox.twig b/data/web/templates/edit/mailbox.twig index c31e0f4408..b3ac8223b3 100644 --- a/data/web/templates/edit/mailbox.twig +++ b/data/web/templates/edit/mailbox.twig @@ -32,8 +32,12 @@ data-style="btn btn-secondary" name="authsource" class="full-width-select form-control" required> + {% if iam_settings.authsource == 'keycloak' %} + {% endif %} + {% if iam_settings.authsource == 'generic-oidc' %} + {% endif %}