Skip to content

Commit

Permalink
[Web] allow mailbox authsource to be switchable
Browse files Browse the repository at this point in the history
  • Loading branch information
FreddleSpl0it authored and DerLinkman committed Feb 8, 2024
1 parent 43600cd commit 17b6ac3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion data/web/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand All @@ -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,
];
}
}
Expand Down
4 changes: 4 additions & 0 deletions data/web/templates/edit/mailbox.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 17b6ac3

Please sign in to comment.