# Proposal: Add Admin Room Management ## Why Currently, rooms can only be soft-deleted (archived) and non-admin users can still see archived rooms when filtering. This creates two issues: 1. **No permanent deletion**: Archived rooms remain in the database indefinitely, and there's no way to completely remove sensitive or test data. 2. **Archived rooms visible to all**: Non-admin users can view archived rooms by changing the status filter, which may expose historical data that should be hidden from general users. ## What Changes ### 1. Admin-Only Permanent Room Deletion - Add new endpoint `DELETE /api/rooms/{room_id}/permanent` - Only system administrator (ymirliu@panjit.com.tw) can execute - Cascading hard delete of all related data (members, messages, files, reports) - Clean up MinIO storage for associated files - Broadcast WebSocket disconnect to active connections ### 2. Hide Archived Rooms from Non-Admin Users - Modify room listing to exclude ARCHIVED status for non-admin users - Even "All Status" filter will not show archived rooms for regular users - Admin users retain full visibility of all room statuses - Remove "Archived" option from frontend status filter for non-admin users ## Related Specs - `chat-room`: Room access control and deletion - `frontend-core`: Room list filtering UI ## Out of Scope - Batch deletion of multiple rooms - Scheduled auto-deletion of old archived rooms - Restore deleted rooms from backup