Jul 29 - Photo absolute media URLs for mobile; add photo retention purge

This commit is contained in:
2026-07-29 19:43:40 -04:00
parent bd994e75e6
commit 60a9af106a
4 changed files with 154 additions and 0 deletions
+12
View File
@@ -88,6 +88,18 @@ class Config:
# a TenantSettings column only if a tenant ever has a real reason to opt out.
PHOTO_STAMP_ENABLED = os.environ.get('PHOTO_STAMP_ENABLED', 'true').lower() == 'true'
# ── Photo retention (MT-13) ─────────────────────────────────────────────
# Days after an issue is RESOLVED before its photo FILES are deleted by
# POST /notifications/purge-old-photos. Unset (None) = the purge is a no-op.
# Deliberately opt-in, not a default: this is a data-minimization policy the
# operator chooses (GDPR Art. 5(1)(e) storage limitation), and some tenants
# have longer contractual/audit retention of their own. Applies per tenant —
# the cron is invoked once per tenant Host, like check-sla.
PHOTO_RETENTION_DAYS = (
int(os.environ['PHOTO_RETENTION_DAYS'])
if os.environ.get('PHOTO_RETENTION_DAYS') else None
)
# ── Session / cookies ───────────────────────────────────────────────────
PERMANENT_SESSION_LIFETIME = timedelta(hours=24)
# Secure by default — subclasses must explicitly opt out for local dev.