Verify mailer credentials against ProcessWeb API before showing E-Mail-Dienst as healthy
Playwright Tests / test (push) Canceled after 0s

The Admin status pill previously turned green whenever the mailer was
enabled in config, without proving the account/token actually work.
Add IComService.VerifyCredentialsAsync (GET /mailer/fc?fn=verify, also
passing serverid when configured so the API confirms this server
belongs to the account) and wire it into a new "email" system-status
probe, so the pill only goes green once the Mailer API itself confirms
the credentials.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Stefan
2026-09-15 23:51:32 +02:00
co-authored by Claude Sonnet 5
parent f36f65789e
commit 107b7f54f1
10 changed files with 339 additions and 28 deletions
+5 -8
View File
@@ -123,7 +123,7 @@ let $adm = {
$$.dc('adm_sec', frm).text($adt.sub_status);
let grid = $$.dc('adm_grid', frm);
$adm.dbCard(grid, info.database || {}, pmap.database);
$adm.mailCard(grid, info.email || {});
$adm.mailCard(grid, info.email || {}, pmap.email);
$adm.blobCard(grid, info.blob || {}, pmap.blob);
$adm.mfrCard(grid, info.mfr || {}, pmap.mfr);
$adm.kvCard(grid, info.keyVault || {}, pmap.keyvault);
@@ -261,12 +261,7 @@ let $adm = {
[$adt.login, d.userId]
], probe);
},
mailCard: function (grid, e) {
let card = $$.dc('adm_card', grid);
let hd = $$.dc('adm_card_hd', card);
$$.s($adt.mail).appendTo(hd);
$adm.setPill($$.sc('adm_pill').appendTo(hd), { status: e.mailerEnabled === true ? 'ok' : 'disabled' });
let bd = $$.dc('adm_card_bd', card);
mailCard: function (grid, e, probe) {
let rows = [
[$adt.mailer, $adm.yesNo(e.mailerEnabled === true)],
[$adt.baseurl, e.baseUrl],
@@ -276,7 +271,9 @@ let $adm = {
[$adt.overrideActive, $adm.yesNo(e.overrideActive === true)]
];
if (e.overrideActive === true) { rows.push([$adt.override, e.overrideRecipient]); }
$adm.kvTable(bd, rows);
// The pill only turns green once the credentials are verified against the Mailer API
// (probe 'email', GET /mailer/fc?fn=verify) — mailerEnabled alone is not proof they work.
let card = $adm.probeCard(grid, $adt.mail, 'email', rows, probe);
let ft = $$.dc('adm_card_ft', card);
$$.bbtn($adt.testmail_btn, 'adm_btn adm_btn_primary').appendTo(ft).click($adm.testMailDlg);
},
File diff suppressed because one or more lines are too long