RBAC and Doc updates
This commit is contained in:
@@ -2,6 +2,26 @@
|
||||
|
||||
This mailing list system uses MySQL with **Postfix's native MySQL support** for real-time dynamic list management. Postfix queries the database directly for each email - no scripts or reloads needed.
|
||||
|
||||
## Management Options
|
||||
|
||||
**1. Web Interface (Recommended for Non-Technical Users)**
|
||||
- Access: http://localhost:3000
|
||||
- Visual interface with tables and forms
|
||||
- Toggle-based subscription management
|
||||
- No SQL knowledge required
|
||||
|
||||
**2. REST API (Recommended for Automation)**
|
||||
- Access: http://localhost:8000/docs
|
||||
- Full CRUD operations via HTTP
|
||||
- Token authentication
|
||||
- Perfect for scripts and integrations
|
||||
|
||||
**3. Direct MySQL (Recommended for Advanced Users)**
|
||||
- Full SQL access for complex queries
|
||||
- Bulk operations and reporting
|
||||
- Database administration tasks
|
||||
- Described in detail below
|
||||
|
||||
## Database Schema
|
||||
|
||||
Three-table design with many-to-many relationships:
|
||||
@@ -36,7 +56,38 @@ Three-table design with many-to-many relationships:
|
||||
|
||||
## Managing Lists and Members
|
||||
|
||||
### Via MySQL Client
|
||||
### Via Web Interface (Easiest)
|
||||
|
||||
1. Open http://localhost:3000 in your browser
|
||||
2. Enter your API_TOKEN (from .env file)
|
||||
3. Use the tabs to:
|
||||
- **Lists Tab**: View, create, edit, delete mailing lists
|
||||
- **Members Tab**: View, add, edit, remove members
|
||||
- **Subscriptions**: Click "Subscriptions" button on any member to toggle their list memberships
|
||||
|
||||
### Via REST API (For Automation)
|
||||
|
||||
See `api/README.md` for complete API documentation, or visit http://localhost:8000/docs for interactive docs.
|
||||
|
||||
Quick examples:
|
||||
```bash
|
||||
# Get all lists
|
||||
curl -H "Authorization: Bearer $API_TOKEN" http://localhost:8000/lists
|
||||
|
||||
# Create member
|
||||
curl -X POST http://localhost:8000/members \
|
||||
-H "Authorization: Bearer $API_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"name":"John Doe","email":"john@example.com","active":true}'
|
||||
|
||||
# Subscribe to list
|
||||
curl -X POST http://localhost:8000/subscriptions \
|
||||
-H "Authorization: Bearer $API_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"list_email":"community@lists.sasalliance.org","member_email":"john@example.com"}'
|
||||
```
|
||||
|
||||
### Via MySQL Client (Advanced)
|
||||
|
||||
Connect to the database:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user