DekEn

อัปเดต 2026-09-07

Admin user management

role, ban, delete, restore

An admin-only console listing every account with five mutations available per user — change role, ban/unban, soft-delete, hard-delete, and restore — the operational control panel behind RBAC.

เมื่อไรจึงใช้
  • You need to promote a user to subscriber/gb/admin manually (e.g. a comped account)
  • You're removing a problem account, temporarily (ban) or permanently (delete)
  • You need to restore an accidentally deleted user before it's too late
คำนวณอย่างไร

Backed by admin_users.py with distinct endpoints per mutation — PATCH /users/{id}/role, PATCH /users/{id}/ban, DELETE /users/{id} (soft), DELETE /users/{id}/hard, POST /users/{id}/restore — each independently authorized to the admin role.

ข้อควรระวัง
noteHard-delete is irreversible by design (no restore endpoint for it) — soft-delete first unless you're certain, since it keeps the restore path open.
ที่เกี่ยวข้อง