feat: administration, account termination, export formats, storage compression #44

Merged
forgejo_admin merged 3 commits from feat/db-formats-admin into master 2026-11-16 17:33:21 -05:00
Owner

Schema, contract and docs changes agreed before the team starts:

  • Single issuer. Users are keyed on the Keycloak subject (users.oidc_subject), and identities is gone. Keycloak brokers every other login, and the professor approved Keycloak as the user module (#1).
  • Administration.
    • Keycloak realm role dongba-admin.
    • admin_actions audit table.
    • Procedures for quota, disable/enable and render backend on/off.
    • Views v_admin_users and v_user_partition.
    • /admin/* routes.
  • Account termination.
    • account_deletions queue: the admin gives a reason, the user is emailed, 30-day default grace period (7–90), in-app appeal, admin cancel or uphold.
    • sp_execute_due_deletions deletes only projects the user owns alone. Co-owned projects and projects shared with them survive.
  • Export formats. output_formats and backend_formats (many-to-many), plus render_jobs.format_code. Pandoc covers HTML page and site, DOCX, ODT, EPUB, LaTeX, Typst and Markdown; Typst covers PNG and SVG. Artifacts are output, log and synctex.
  • Storage.
    • Blobs record encoding (zstd or identity) and stored_bytes.
    • sp_register_blob runs after each upload.
    • Uploads take optimizeImages (default true) for lossy image optimization.
  • Workers call compilers directly; tern stays the docs tool.

Table counts are now 19 core, 7 many-to-many and 8 dictionaries, with 15 views and 37 procedures. The full bundle loads on MariaDB 11.4 and MySQL 8.4 with identical results, including an executed termination and an HTML render.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q7bU4Kec4w6pVqigbajupv

Schema, contract and docs changes agreed before the team starts: - **Single issuer.** Users are keyed on the Keycloak subject (`users.oidc_subject`), and `identities` is gone. Keycloak brokers every other login, and the professor approved Keycloak as the user module (#1). - **Administration.** - Keycloak realm role `dongba-admin`. - `admin_actions` audit table. - Procedures for quota, disable/enable and render backend on/off. - Views `v_admin_users` and `v_user_partition`. - `/admin/*` routes. - **Account termination.** - `account_deletions` queue: the admin gives a reason, the user is emailed, 30-day default grace period (7–90), in-app appeal, admin cancel or uphold. - `sp_execute_due_deletions` deletes only projects the user owns alone. Co-owned projects and projects shared with them survive. - **Export formats.** `output_formats` and `backend_formats` (many-to-many), plus `render_jobs.format_code`. Pandoc covers HTML page and site, DOCX, ODT, EPUB, LaTeX, Typst and Markdown; Typst covers PNG and SVG. Artifacts are `output`, `log` and `synctex`. - **Storage.** - Blobs record `encoding` (zstd or identity) and `stored_bytes`. - `sp_register_blob` runs after each upload. - Uploads take `optimizeImages` (default true) for lossy image optimization. - **Workers call compilers directly; tern stays the docs tool.** Table counts are now 19 core, 7 many-to-many and 8 dictionaries, with 15 views and 37 procedures. The full bundle loads on MariaDB 11.4 and MySQL 8.4 with identical results, including an executed termination and an HTML render. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Q7bU4Kec4w6pVqigbajupv
Users are keyed on the Keycloak subject now that a single issuer is
approved, which removes identities. admin_actions records every instance
admin action; account_deletions queues terminations with a reason, a
notice, a grace period and an appeal, and deletes only the projects the
user owns alone. output_formats and backend_formats let a render pick its
format. Blobs record their at-rest encoding and stored size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7bU4Kec4w6pVqigbajupv
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7bU4Kec4w6pVqigbajupv
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7bU4Kec4w6pVqigbajupv
forgejo_admin deleted branch feat/db-formats-admin 2026-11-16 17:33:21 -05:00
Sign in to join this conversation.
No description provided.