public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
[Web] allow mailbox authsource to be switchable
17b6ac33
data/web/edit.php | 4 +++-
data/web/templates/edit/mailbox.twig | 4 ++++
2 files changed, 7 insertions(+), 1 deletion(-)
Diff
diff --git a/data/web/edit.php b/data/web/edit.php
index 83ae1467..f13bc28d 100644
--- a/data/web/edit.php
+++ b/data/web/edit.php
@@ -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,
];
}
}
diff --git a/data/web/templates/edit/mailbox.twig b/data/web/templates/edit/mailbox.twig
index c31e0f44..b3ac8223 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>
<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>