feat: Enhance admin user management system
- Add admin override capability to DELETE /api/auth/account endpoint - Move /api/auth/users to admin-only with complete user fields (first_name, last_name, role, theme) - Consolidate Bruno requests: remove duplicate List Users (Admin), merge Delete Account functionality - Update all documentation to reflect enhanced capabilities - Implement pgx 5 standards compliance with proper error handling BREAKING CHANGES: - /api/auth/users endpoint now requires admin role (was previously accessible) - DELETE /api/auth/account accepts optional user_id parameter for admin deletion
This commit is contained in:
@@ -17,6 +17,13 @@ This directory contains Bruno collection for testing the Bookmann API with compr
|
||||
- **Login User**: POST /api/auth/login - Authenticate (email or username)
|
||||
- **Get Profile**: GET /api/auth/profile - Get user info (requires token)
|
||||
|
||||
### User Management (Admin Only)
|
||||
- **List Users**: GET /api/auth/users - Get all users with complete profile info (admin only)
|
||||
- **Delete Account**: DELETE /api/auth/account - Delete own account or admin deletes other accounts with `user_id` parameter (admin only)
|
||||
|
||||
### User Management (Protected)
|
||||
- **Delete Account**: DELETE /api/auth/account - Delete own account (self) or admin deletes other accounts with `user_id` parameter (admin only)
|
||||
|
||||
### Folders (Admin Only)
|
||||
- **Add Ebook Folder**: POST /api/auth/ebook-folders - Add folder for scanning (admin only)
|
||||
- **Get Ebook Folders**: GET /api/auth/ebook-folders - List configured folders (admin only)
|
||||
|
||||
Reference in New Issue
Block a user