mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
PERF: improve perf of initial payload
also reduce querying in topic query
This commit is contained in:
@@ -54,8 +54,11 @@ module CategoryGuardian
|
||||
|
||||
# all allowed category ids
|
||||
def allowed_category_ids
|
||||
unrestricted = Category.where(read_restricted: false).pluck(:id)
|
||||
unrestricted.concat(secure_category_ids)
|
||||
@allowed_category_ids ||=
|
||||
begin
|
||||
unrestricted = Category.where(read_restricted: false).pluck(:id)
|
||||
unrestricted.concat(secure_category_ids)
|
||||
end
|
||||
end
|
||||
|
||||
def topic_create_allowed_category_ids
|
||||
|
||||
Reference in New Issue
Block a user