feat: whatsapp admin api in mobile-api
- /api/admin/whatsapp: conversations, thread, send, read, assign, start, templates and sync, media, unread count, assignees. - Caller context from the token: company through AdminCompanyScope (fail closed), admin for BO_WHATSAPP_ADMIN or super admin. - Exactly-one validation for send, assign and start; path ids must look like uuids before they reach the service. - Service reason codes come back with their status and a message; an unreachable service is 502. - Owner and assignee names filled from the system service. - Audit: send (conversation and template name, never text), assign (owner before and after), start, sync; read markers skipped. - Media streams with nosniff and a sandbox CSP; anything but image, audio or video downloads. - Disabling a user or changing their roles tells the service to free their chats (best effort). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
This commit is contained in:
1 parent
0d5c3f351a
commit
13b692748c
8 files changed
+1030
-1
No files matched your search
@@ -53,7 +53,7 @@ Verify commands:
|
||||
- Depends on: 3.2
|
||||
- Scope: `solvway-services-whatsapp/**`, `local/whatsapp-mock/**`
|
||||
- Verify: `mvn -T 1C -q -pl solvway-services-whatsapp verify`
|
||||
- [ ] 4.2 mobile-api admin API: every endpoint in design decision 9, module checks, company scoping (fail closed), audit, and the `userChanged` call from the user save path.
|
||||
- [x] 4.2 mobile-api admin API: every endpoint in design decision 9, module checks, company scoping (fail closed), audit, and the `userChanged` call from the user save path.
|
||||
- Depends on: 4.1
|
||||
- Scope: `solvway-mobile-api/**` (security code: also read the whole diff in the controller check)
|
||||
- Verify: `mvn -T 1C -q -pl solvway-mobile-api verify`
|
||||
|
||||
Reference in new issue
Block a user