screentinker/server
ScreenTinker 0d14db97a6 feat(admin): Delete Organization + Workspace with cascade (#36)
Platform admins can now cleanly remove a customer org (account ends) or a stray
workspace from the UI, instead of raw SQL that risks orphaning resources.

The tenant cascade isn't pure DB CASCADE - workspace-scoped tables (devices,
content, playlists, ...) are NO ACTION and must be purged before the workspace.
Extracted that logic out of deleteUserCascade into shared deleteWorkspaceCascade /
deleteOrgCascade helpers (one tested implementation; deleteUserCascade now reuses
the purgeWorkspaces extraction).

Backend (platform-admin only): GET /api/admin/orgs (list + owner + counts +
workspaces), DELETE /api/admin/orgs/:id, DELETE /api/admin/workspaces/:id.
UI: an Organizations section in Admin listing every org/workspace with a
type-the-name confirmation before the irreversible delete.
Tests: org/workspace cascade (real FKs) + endpoint gating/404. Suite 53/53.
2026-06-09 09:22:21 -05:00
..
config fix: log real client IPs through Cloudflare instead of CF edge 2026-05-07 15:26:37 -05:00
db feat(layouts): per-zone fit mode + default to 'contain' 2026-06-09 08:55:15 -05:00
lib feat(admin): Delete Organization + Workspace with cascade (#36) 2026-06-09 09:22:21 -05:00
middleware fix(security): patch quick-win findings from the codebase review 2026-06-08 19:02:19 -05:00
player fix(player-web): don't optimistic-render fullscreen when layout is unknown 2026-06-09 08:30:58 -05:00
routes feat(admin): Delete Organization + Workspace with cascade (#36) 2026-06-09 09:22:21 -05:00
services feat(signup): T+3 activation nudge for users with zero paired screens 2026-05-30 20:28:24 -05:00
test feat(admin): Delete Organization + Workspace with cascade (#36) 2026-06-09 09:22:21 -05:00
ws feat(debug): live per-device debug logging toggle on the device screen 2026-06-08 21:49:03 -05:00
.gitignore feat(email): Microsoft Graph send + alert spam protection + preferences UI 2026-05-12 18:16:40 -05:00
config.js feat(signup): optional org-on-create for self-service signups (#12) 2026-06-05 11:16:27 -05:00
package-lock.json feat(email): Microsoft Graph send + alert spam protection + preferences UI 2026-05-12 18:16:40 -05:00
package.json test(admin): node:test coverage for Add User + role gating 2026-06-05 11:23:06 -05:00
server.js fix(security): patch quick-win findings from the codebase review 2026-06-08 19:02:19 -05:00