[3.x] Represent permanent suspensions explicitly

Aperta
#5,436 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Saksham-chourasia ci sta già lavorando.

Dal 9/11/2026.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript, laravel, php

Direzione di ricerca

Start by reading the suspension storage and user API code, then trace Suspend's permissions, search, UI, notifications and Audit integration; the issue also names GDPR anonymisation and extension compatibility as affected areas. Define the explicit state, transitions, migration and compatibility rules before implementation, including how historical notification data is handled. Done means those paths and the extension migration guide reflect the agreed design and affected integrations are coordinated.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

Permanent suspensions currently use a sentinel value in users.suspended_until: the forum sends 2038-01-01. This represents an indefinite suspension using a date that will eventually expire, and requires consumers to infer intent from that date.

Follow-up to #4665 ([1.x & 2.x] Permanent Ban suspended_until is set to 2038-01-01 00:00:00). Keep the compatible recognition fix in 2.x; use 3.0 to design an explicit representation of permanent suspension.

Proposed scope
  • Define explicit permanent-suspension state in storage and the user API, with clear temporary, permanent and unsuspended transitions. The precise schema remains a design decision.
  • Provide shared backend status/query helpers and frontend status helpers so extensions do not need to duplicate date comparisons.
  • Define compatibility and migration rules for existing suspension dates, API clients, direct model writes and historical notifications. Do not infer that every sufficiently distant date means permanent suspension: integrations also use ordinary long-duration dates.
  • Update Suspend's permissions, search, UI, notifications and Audit integration, plus GDPR anonymisation and documentation.
  • Publish an extension migration guide and coordinate affected integrations before release.
Historical notification data

The current UserSuspendedBlueprint::getData() returns Carbon::now(), while the frontend interprets the notification content as the suspension expiry. This mismatch was confirmed by source inspection during the 2.x recognition fix; its user-facing effect has not yet been reproduced on a forum.

The 3.0 migration must not assume historical notification content reliably identifies the expiry or whether a suspension was permanent. A user's current suspension state also cannot reconstruct their full suspension history. Fixing the existing notification payload mismatch is separate from changing permanent-suspension storage.

Ecosystem compatibility

This cannot safely be implemented in 2.x by setting suspended_until to null for permanently suspended users. Existing 2.x consumers read that column directly, including SQL queries:

There are direct writers too: FoF Anti Spam saves suspension dates directly to the model, deliberately bypassing suspension notifications. Preserving only the JSON:API representation would not protect these database consumers or writers.

These examples come from source inspection, not an exhaustive inventory or runtime compatibility test. They demonstrate why the change needs a major-version migration rather than a flag-and-null replacement in 2.x.

Lingua principale
PHP
Stelle
6.8k
Fork
891
Merge medio
1g 10h
PR unite (30g)
209

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di flarum/framework

Tutte le issue di flarum/framework

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.