Say which legacy protocols are off when only some are
inbuxa can now switch IMAP, POP3 and ManageSieve off one at a time, server-wide and per organization, and the session lists what is still allowed for the account (legacyAllowed). Where the webmail said "legacy protocols are off", it now also covers the case where only some are: - Security & sessions, above app passwords: "Your organization has turned off POP3 for mail apps. Mail apps that use it can't connect to this account; others still can." - The Administration dashboard: "Some legacy mail protocols are off for your organization: POP3." - An organization's sheet in Administration: its switch stays the all-or-nothing one; when only some are off it names them and points to the console, where they're switched one at a time, and "Turn legacy protocols back on" turns them all back on. With every protocol off, the existing wording shows, as before. From a server that doesn't send legacyAllowed nothing new appears. 3 new strings in all nine catalogs, unreviewed. Tested: unit tests for reading the session and a tenant's switches; the existing tests updated for the new field; typecheck; the whole suite (1475 tests); and in headless Chrome against a local server with POP3 off, where Security & sessions showed the new note.
This commit is contained in:
1 parent
ac0f8789f6
commit
44f8e30c45
17 files changed
+135
-10
No files matched your search
@@ -34,7 +34,10 @@ export interface RecentUse {
|
||||
}
|
||||
|
||||
export interface TenantLegacy {
|
||||
/** All of IMAP, POP3 and ManageSieve off: the kill-all's state. */
|
||||
off: boolean;
|
||||
/** When only some are off, which, by name; set one at a time in the console. */
|
||||
partlyOff: string[];
|
||||
/** Null from a server too old to say who uses legacy apps -- not the same as nobody. */
|
||||
recent: RecentUse[] | null;
|
||||
}
|
||||
@@ -49,8 +52,13 @@ function parseRecent(raw: unknown): RecentUse[] | null {
|
||||
});
|
||||
}
|
||||
|
||||
const PROTOCOL_NAMES: [string, string][] = [["imap", "IMAP"], ["pop3", "POP3"], ["manageSieve", "ManageSieve"]];
|
||||
|
||||
export function parseTenantLegacy(raw: Record<string, unknown>): TenantLegacy {
|
||||
return { off: raw.legacyProtocols === "disabled", recent: parseRecent(raw.recentLegacyUse) };
|
||||
const off = raw.legacyProtocols === "disabled";
|
||||
// An older server sends only legacyProtocols, which stands for all three.
|
||||
const partlyOff = off ? [] : PROTOCOL_NAMES.filter(([key]) => raw[key] === "disabled").map(([, name]) => name);
|
||||
return { off, partlyOff, recent: parseRecent(raw.recentLegacyUse) };
|
||||
}
|
||||
|
||||
/** The tenant's switch, or null where the server has none (not INBUXA, or too old). */
|
||||
|
||||
Reference in new issue
Block a user