mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 07:14:41 +08:00
FIX: Prevent unauthorized list of private message titles. Also remove some unused code.
This commit is contained in:
@ -243,22 +243,6 @@ describe UserAction do
|
||||
)
|
||||
end
|
||||
|
||||
it 'should collapse the inbox correctly' do
|
||||
|
||||
stream = UserAction.private_message_stream(UserAction::GOT_PRIVATE_MESSAGE, user_id: target_user.id, guardian: Guardian.new(target_user))
|
||||
# inbox should collapse this initial and reply message into one item
|
||||
stream.count.should == 1
|
||||
|
||||
|
||||
# outbox should also collapse
|
||||
stream = UserAction.private_message_stream(UserAction::NEW_PRIVATE_MESSAGE, user_id: user.id, guardian: Guardian.new(user))
|
||||
stream.count.should == 1
|
||||
|
||||
# anon should see nothing
|
||||
stream = UserAction.private_message_stream(UserAction::NEW_PRIVATE_MESSAGE, user_id: user.id, guardian: Guardian.new(nil))
|
||||
stream.count.should == 0
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
describe 'synchronize_favorites' do
|
||||
|
Reference in New Issue
Block a user