[Web] allow mailbox authsource to be switchable

This commit is contained in:
FreddleSpl0it 2023-07-28 15:36:48 +02:00 committed by DerLinkman
parent 43600cd127
commit 17b6ac3313
No known key found for this signature in database
GPG Key ID: F109FD97469550A2
2 changed files with 7 additions and 1 deletions

View File

@ -118,6 +118,7 @@ if (isset($_SESSION['mailcow_cc_role'])) {
$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 @@ if (isset($_SESSION['mailcow_cc_role'])) {
'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,
];
}
}

View File

@ -32,8 +32,12 @@
data-style="btn btn-secondary"
name="authsource" class="full-width-select form-control" required>
<option value="mailcow" {% if result.authsource == "mailcow" %}selected{% endif %}>mailcow</option>
{% if iam_settings.authsource == 'keycloak' %}
<option value="keycloak" {% if result.authsource == "keycloak" %}selected{% endif %}>Keycloak</option>
{% endif %}
{% if iam_settings.authsource == 'generic-oidc' %}
<option value="generic-oidc" {% if result.authsource == "generic-oidc" %}selected{% endif %}>Generic-OIDC</option>
{% endif %}
</select>
</div>
</div>