Skip to content

Admin Moderation Tools + Audit Trail (Referrals) #206

Description

@Aditya8369

Issue Details

Description: Admins can moderate referrals: flag spam, hide content, suspend poster, and see an audit log of moderation actions.

Proposed plan:
Backend: Add ReferralModerationAction model with adminId, referralId, actionType, reason, createdAt.
API: Admin-only endpoints:
POST /api/admin/referrals/:id/flag
POST /api/admin/referrals/:id/hide
POST /api/admin/referrals/:id/restore
Enforcement: Update referral queries (getReferrals) to exclude hidden/removed referrals for normal users.
Frontend: Add moderation section in existing admin referrals UI (there is frontend/src/admin/AdminReferrals.jsx in the repo).
Audit: Always log the action and reason.

Metadata

Metadata

Assignees

Labels

NSOC'26Issues for the NSOC 2026 programblankUncategorized issue template

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions