mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-08 07:40:08 +09:00
Apply the same user filter to every page of account members
Administrators see banned users in the account settings, but only the first page counted them: the next pages listed active users alone. A banned member before the page boundary shifted the offset, so one active member was never listed. Both pages now share User.visible_to. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0142qgjggdJ2KDdGk7RF9Xm9
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
require "test_helper"
|
||||
|
||||
class User::BannableTest < ActiveSupport::TestCase
|
||||
test "banned users are visible to administrators only" do
|
||||
users(:kevin).banned!
|
||||
|
||||
assert_includes User.visible_to(users(:david)), users(:kevin)
|
||||
assert_not_includes User.visible_to(users(:jz)), users(:kevin)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user