Let a secret be marked as never expiring

The expiry date is now optional: no date means the secret never expires,
gets the status "no expiry" and never raises an alert or reminder. The
Secrets form has a "Never expires" checkbox. Certificates checked against a
host keep their live expiry and can't be set to never expire. Migration
0016 makes secrets.expiry_date nullable.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-10-11 01:44:40 +02:00
1 parent 75f0a3d881
commit 3daec601fd
11 files changed
+2069 -36

No files matched your search

+7 -4
View File
@@ -78,20 +78,22 @@ export interface DiagLogResponse {
}
export type SecretType = "api_token" | "ssl_certificate" | "password" | "generic";
export type SecretStatus = "ok" | "expiring" | "expired";
export type SecretStatus = "ok" | "expiring" | "expired" | "never";
export interface SecretRecord {
id: number;
name: string;
type: SecretType;
description: string | null;
expiryDate: string;
/** null = never expires. */
expiryDate: string | null;
warnDays: number;
notes: string | null;
createdAt: string;
updatedAt: string;
status: SecretStatus;
daysLeft: number;
/** null when the secret never expires. */
daysLeft: number | null;
/** ssl_certificate only — when set, expiryDate is read from the live certificate here rather than typed in. */
checkHost: string | null;
checkPort: number | null;
@@ -104,7 +106,8 @@ export interface SecretInput {
type: SecretType;
description?: string;
/** Omitted when a host to check is given — the date then comes from the live certificate. */
expiryDate?: string;
/** null = never expires. */
expiryDate?: string | null;
warnDays: number;
notes?: string;
checkHost?: string | null;