mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 05:53:52 +08:00
Also allow system_user to send pm's even if enable_private_messages is disabled
This commit is contained in:
@ -136,9 +136,10 @@ describe Guardian do
|
||||
Guardian.new(user).can_send_private_message?(another_user).should be_false
|
||||
end
|
||||
|
||||
it "returns true for the contact user" do
|
||||
it "returns true for the contact user and system user" do
|
||||
SiteSetting.stubs(:site_contact_username).returns(user.username)
|
||||
Guardian.new(user).can_send_private_message?(another_user).should be_true
|
||||
Guardian.new(Discourse.system_user).can_send_private_message?(another_user).should be_true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user