Skip to the content.

Admin operational lifecycle and deletion choices

Mermaid flowchart expresses UML activity concepts. This is the normal standalone path with adminWritesEnabled true. Client token presence does not prove server acceptance; route auth remains authoritative. Media has separate client/error handling. No server recycle bin or universal Undo is implemented. Canceling blog confirmation or using media Undo keeps the item without DELETE. Tab storage is independent after duplication; no server-side logout is issued.

flowchart TB
  A([Open admin]) --> H["Client-only pages load session plugin"]
  H --> S["Restore token/database state"]
  S --> G{"Token present for protected page?"}
  G -->|No| L["Sign in with shared token"]
  L --> V{"Server accepts token?"}
  V -->|No| L
  V -->|Yes| SAVE["Save token and follow safe redirect"]
  SAVE --> NAV["Select feature and backend"]
  G -->|Yes| NAV
  NAV --> F{"Operation"}
  F -->|Blog| B["List / edit / publish / unpublish"]
  F -->|Messages| M["List messages"]
  F -->|CDN| C["List / upload / sync"]
  F -->|Media| D["Separate DAM workflow"]
  F -->|Deletion| K{"Feature"}
  K -->|Blog| BC["Native confirm then DELETE"]
  K -->|Message or CDN| DC["Immediate DELETE"]
  K -->|Media| MC["Inline confirm and 8-second Undo before DELETE"]
  B --> R{"Response"}
  M --> R
  C --> R
  D --> R
  BC --> R
  DC --> R
  MC --> R
  R -->|Success| NAV
  R -->|Other error| E["Surface error"]
  E --> NAV
  R -->|Current-token 401 via adminFetch| EX["Clear token, expired sign-in"]
  EX --> L
  NAV -->|Clear saved token| OUT["Clear token, preserve database"]
  OUT --> L

Source evidence