mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Hide a post's pending flag count from TL4 users. (#13129)
They can't see the review queue, so there's no reason to show a button with the post's pending flag count in the post controls.
This commit is contained in:
@@ -112,4 +112,13 @@ describe TopicGuardian do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#can_review_topic?' do
|
||||
it 'returns false for TL4 users' do
|
||||
tl4_user = Fabricate(:user, trust_level: TrustLevel[4])
|
||||
topic = Fabricate(:topic)
|
||||
|
||||
expect(Guardian.new(tl4_user).can_review_topic?(topic)).to eq(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user