feat(moderation): add chat bans list endpoint with admin access checks
Some checks are pending
CI / test (push) Has started running
Some checks are pending
CI / test (push) Has started running
This commit is contained in:
@@ -811,6 +811,22 @@ Auth required (`owner/admin` in group/channel).
|
||||
Response: `204`
|
||||
Behavior: bans user from chat and removes membership if present.
|
||||
|
||||
### GET `/api/v1/chats/{chat_id}/bans`
|
||||
|
||||
Auth required (`owner/admin` in group/channel).
|
||||
Response: `200` + `ChatBanRead[]`
|
||||
|
||||
Example item:
|
||||
|
||||
```json
|
||||
{
|
||||
"chat_id": 42,
|
||||
"user_id": 101,
|
||||
"banned_by_user_id": 5,
|
||||
"created_at": "2026-03-10T00:00:00Z"
|
||||
}
|
||||
```
|
||||
|
||||
### DELETE `/api/v1/chats/{chat_id}/bans/{user_id}`
|
||||
|
||||
Auth required (`owner/admin` in group/channel).
|
||||
|
||||
@@ -31,7 +31,7 @@ Legend:
|
||||
22. Text Formatting - `PARTIAL` (bold/italic/underline/spoiler/mono/links + strikethrough + quote/code block; toolbar still evolving)
|
||||
23. Groups - `PARTIAL` (create/add/remove/invite link; join-by-invite and invite permissions covered by integration tests; advanced moderation partial)
|
||||
24. Roles - `DONE` (owner/admin/member)
|
||||
25. Admin Rights - `PARTIAL` (delete/pin/edit info + explicit ban API for groups/channels; integration tests cover channel member read-only, channel admin full-delete, channel message delete-for-all permissions, group profile edit permissions, and owner-only role management rules; remaining UX moderation tools limited)
|
||||
25. Admin Rights - `PARTIAL` (delete/pin/edit info + explicit ban APIs for groups/channels including ban list endpoint; integration tests cover channel member read-only, channel admin full-delete, channel message delete-for-all permissions, group profile edit permissions, owner-only role management rules, and admin-visible/member-forbidden ban-list access; remaining UX moderation tools limited)
|
||||
26. Channels - `PARTIAL` (create/post/edit/delete/subscribe/unsubscribe; UX edge-cases still polishing)
|
||||
27. Channel Types - `DONE` (public/private)
|
||||
28. Notifications - `PARTIAL` (browser notifications + mute/settings; chat mute is propagated in chat list payload, honored by web realtime notifications with mention override, and mute toggle now syncs instantly in chat store; backend now emits `chat_updated` after notification mute/unmute for cross-tab consistency; no mobile push infra)
|
||||
|
||||
Reference in New Issue
Block a user