[Web] allow mailbox authsource to be switchable
This commit is contained in:
parent
6972d277fd
commit
35d384d32d
|
@ -112,6 +112,7 @@ if (isset($_SESSION['mailcow_cc_role'])) {
|
||||||
$quarantine_category = mailbox('get', 'quarantine_category', $mailbox);
|
$quarantine_category = mailbox('get', 'quarantine_category', $mailbox);
|
||||||
$get_tls_policy = mailbox('get', 'tls_policy', $mailbox);
|
$get_tls_policy = mailbox('get', 'tls_policy', $mailbox);
|
||||||
$rlyhosts = relayhost('get');
|
$rlyhosts = relayhost('get');
|
||||||
|
$iam_settings = identity_provider('get');
|
||||||
$template = 'edit/mailbox.twig';
|
$template = 'edit/mailbox.twig';
|
||||||
$template_data = [
|
$template_data = [
|
||||||
'acl' => $_SESSION['acl'],
|
'acl' => $_SESSION['acl'],
|
||||||
|
@ -124,7 +125,8 @@ if (isset($_SESSION['mailcow_cc_role'])) {
|
||||||
'rlyhosts' => $rlyhosts,
|
'rlyhosts' => $rlyhosts,
|
||||||
'sender_acl_handles' => mailbox('get', 'sender_acl_handles', $mailbox),
|
'sender_acl_handles' => mailbox('get', 'sender_acl_handles', $mailbox),
|
||||||
'user_acls' => acl('get', 'user', $mailbox),
|
'user_acls' => acl('get', 'user', $mailbox),
|
||||||
'mailbox_details' => $result
|
'mailbox_details' => $result,
|
||||||
|
'iam_settings' => $iam_settings,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,12 @@
|
||||||
data-style="btn btn-secondary"
|
data-style="btn btn-secondary"
|
||||||
name="authsource" class="full-width-select form-control" required>
|
name="authsource" class="full-width-select form-control" required>
|
||||||
<option value="mailcow" {% if result.authsource == "mailcow" %}selected{% endif %}>mailcow</option>
|
<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>
|
<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>
|
<option value="generic-oidc" {% if result.authsource == "generic-oidc" %}selected{% endif %}>Generic-OIDC</option>
|
||||||
|
{% endif %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue