mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 02:34:28 +08:00
DEV: Remove enable_whispers site setting (#19196)
* DEV: Remove enable_whispers site setting Whispers are enabled as long as there is at least one group allowed to whisper, see whispers_allowed_groups site setting. * DEV: Always enable whispers for admins if at least one group is allowed.
This commit is contained in:
@ -342,7 +342,7 @@ RSpec.describe TopicView do
|
||||
|
||||
describe '.post_counts_by_user' do
|
||||
it 'returns the two posters with their appropriate counts' do
|
||||
SiteSetting.enable_whispers = true
|
||||
SiteSetting.whispers_allowed_groups = "#{Group::AUTO_GROUPS[:staff]}"
|
||||
Fabricate(:post, topic: topic, user: evil_trout, post_type: Post.types[:whisper])
|
||||
# Should not be counted
|
||||
Fabricate(:post, topic: topic, user: evil_trout, post_type: Post.types[:whisper], action_code: 'assign')
|
||||
@ -480,7 +480,7 @@ RSpec.describe TopicView do
|
||||
|
||||
describe 'whispers' do
|
||||
it "handles their visibility properly" do
|
||||
SiteSetting.enable_whispers = true
|
||||
SiteSetting.whispers_allowed_groups = "#{Group::AUTO_GROUPS[:staff]}"
|
||||
p1 = Fabricate(:post, topic: topic, user: evil_trout)
|
||||
p2 = Fabricate(:post, topic: topic, user: evil_trout, post_type: Post.types[:whisper])
|
||||
p3 = Fabricate(:post, topic: topic, user: evil_trout)
|
||||
|
Reference in New Issue
Block a user