Contactbeheer: berichten, schakelaar en tweelaagse poort voor het formulier
Beheerroutes zonder /admin-segment op contact-messages (lijst met spam apart en ongelezen-teller zonder spam, detail, status, verwijderen, opnieuw versturen met eigen limiet) en contact-settings voor de CMS-schakelaar, allemaal AdminOnly. Het formulier is alleen open als de hostvlag EN de CMS-schakelaar (standaard uit) aan staan; de hostvlag wordt eerst gecontroleerd zodat de database niet wordt aangeraakt. Bij uitgeschakelde host antwoorden de beheerroutes 404. OpenAPI-document bijgewerkt. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -56,3 +56,18 @@ public class IdempotencyRecord
|
||||
public DateTimeOffset CreatedAt { get; set; }
|
||||
public int StatusCode { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The CMS-controlled on/off switch of the contact form (a singleton row, id 1). While no row
|
||||
/// exists the switch is off. It is the second layer of the gate; the host switch
|
||||
/// (<c>Contact:Enabled</c>) is the first.
|
||||
/// </summary>
|
||||
public class ContactSettings
|
||||
{
|
||||
public const int SingletonId = 1;
|
||||
|
||||
public int Id { get; set; } = SingletonId;
|
||||
public bool Enabled { get; set; }
|
||||
public DateTimeOffset UpdatedAt { get; set; }
|
||||
public Guid UpdatedByUserId { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user