Skip to content

Add shadow banning to hide users from mentoring#8918

Merged
iHiD merged 5 commits intomainfrom
ihid/shadow-ban-mentoring
Mar 18, 2026
Merged

Add shadow banning to hide users from mentoring#8918
iHiD merged 5 commits intomainfrom
ihid/shadow-ban-mentoring

Conversation

@iHiD
Copy link
Member

@iHiD iHiD commented Mar 18, 2026

Summary

  • Add shadow_banned_at and shadow_banned_by_id columns to users table
  • Shadow-banned students' mentoring requests are hidden from all mentors
  • Shadow-banned students' mentoring discussions are hidden from all mentors
  • Shadow-banned mentors see an empty request queue
  • New /moderation/shadow_banned_users UI for moderators to add/remove shadow bans
  • Tracks who applied each ban and when

Test plan

  • bin/rails test test/commands/mentor/request/retrieve_test.rb — shadow-banned students filtered out, shadow-banned mentors see empty queue
  • bin/rails test test/commands/mentor/discussion/retrieve_test.rb — shadow-banned students' discussions filtered out
  • bin/rails test test/controllers/moderation/shadow_banned_users_controller_test.rb — access control, create/destroy actions

🤖 Generated with Claude Code

iHiD and others added 5 commits March 18, 2026 20:29
Shadow-banned users' mentoring requests are hidden from all mentors,
and shadow-banned mentors see an empty request queue. Adds a moderation
UI at /moderation/shadow_banned_users for moderators to manage bans.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract shadow ban filtering into User.shadow_banned scope and
dedicated filter_shadow_banned! method in discussion retrieve.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@iHiD iHiD merged commit 2c56c3f into main Mar 18, 2026
40 checks passed
@iHiD iHiD deleted the ihid/shadow-ban-mentoring branch March 18, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant