M1 review: reference site types and an e2e check of the bound SMTP password
Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
fd203de326
commit
a32329fbb4
@@ -252,5 +252,9 @@ test('API: a staff password without the 2FA code opens nothing; with the code it
|
||||
// the secret is stored (create-test-admin.ts) and never returned, also to a fully signed-in admin
|
||||
expect(after.data.SiteIntegration.smtpPassword).toBe('********')
|
||||
expect(JSON.stringify(after)).not.toContain('e2e-sink')
|
||||
// …and it stays with the server it was saved for: moving the server without typing the password again is refused
|
||||
const moved = await api.post('/api/globals/site-integrations', { data: { smtpHost: 'elsewhere.example.com' } })
|
||||
expect(moved.status()).toBe(400)
|
||||
expect(await moved.text()).toMatch(/Enter the password again|Wpisz hasło ponownie/)
|
||||
await api.dispose()
|
||||
})
|
||||
|
||||
@@ -2799,6 +2799,10 @@ export interface SiteIntegration {
|
||||
* Usually 587, or 465.
|
||||
*/
|
||||
smtpPort?: number | null;
|
||||
/**
|
||||
* The password is sent only over an encrypted connection; without one, no e-mail is sent.
|
||||
*/
|
||||
smtpRequireTls?: boolean | null;
|
||||
smtpUser?: string | null;
|
||||
smtpPassword?: string | null;
|
||||
emailStatus?: {
|
||||
@@ -3220,6 +3224,7 @@ export interface SiteIntegrationsSelect<T extends boolean = true> {
|
||||
smtpFromName?: T;
|
||||
smtpHost?: T;
|
||||
smtpPort?: T;
|
||||
smtpRequireTls?: T;
|
||||
smtpUser?: T;
|
||||
smtpPassword?: T;
|
||||
emailStatus?:
|
||||
|
||||
Reference in New Issue
Block a user