feat(moderation): implement moderator management interface with automatic logging#379
Conversation
|
To give you more visibility on the next steps:
I'll start with the Request System integration on this branch unless you prefer I wait for this first part to be merged! |
|
|
|
Hello again :) Thank you for all the work and energy ! As usual, on the substance:
And on the form: when you are working on a PR, could you keep it as a draft and whenever you add commits, update the description at the top ? Otherwise, i'll end up A) reviewing the code multiple times B) having to update my mental model of your PR on each comment |
…nd enforce rejection reason
…s and restrict removal to admins
…lt on rejection_reason
…ion, and Turbo UI
…g unnecessary exclusions
…for moderator removal
|
Awesome, thank you for all the fixes and the back and forth ! |






UPDATE (April 13, 2026): Addressed Review Feedback
Based on the latest code review, I have significantly refactored the moderation system to improve security, accountability, and code quality:
request.POSThandling with a robust Django Form (ProcessRepresentativeRequestForm).moderators_list,moderator_add, andmoderator_remove.is_staff) can now remove a moderator. Simple moderators can only view the list and add new members.process_representative_request) and switched all code comments to English./moderation/logs/(accessible to all logged-in users via the footer).Paginatorfor long-term scalability.ModerationLogmodel now uses@propertymethods (action_text,action_color,target_text) to act as a "translator". This ensures clean UI rendering and robust fallbacks for legacy logs.Context
This PR is the first step of the moderation system overhaul. It focuses on creating a dedicated interface to manage moderator permissions directly from the site, moving away from the Django admin for daily operations.
Key Features
/moderation/to centralize all tools.is_stafforis_moderator.Screenshots (New)
1. Moderation Hub (Landing Page)

2. Moderator Management UI

3. Public Transparency Logs (Paginated)

4. Targeted Error Feedback

Manual Testing
is_moderator=Trueand creates a semantic log.