mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
PERF: topic_view participant post count: don't send back ID list (#10210)
On large topics, the cost of sending the entire post ID list back over to the database is signficant. Just have the DB recalculate the list of visible posts instead.
This commit is contained in:
@@ -31,6 +31,10 @@ module TopicGuardian
|
||||
is_staff? && SiteSetting.enable_whispers?
|
||||
end
|
||||
|
||||
def can_see_whispers?(_topic)
|
||||
is_staff?
|
||||
end
|
||||
|
||||
def can_publish_topic?(topic, category)
|
||||
is_staff? && can_see?(topic) && can_create_topic?(category)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user