[Web] allow mailbox authsource to be switchable

This commit is contained in:
FreddleSpl0it 2023-07-28 15:36:48 +02:00
parent 6972d277fd
commit 35d384d32d
No known key found for this signature in database
GPG Key ID: 00E14E7634F4BEC5
2 changed files with 7 additions and 1 deletions

View File

@ -112,6 +112,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'],
@ -124,7 +125,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

@ -23,8 +23,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>