mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
work in progress, add fidelity to category group permissions (full, create posts, readonly)
This commit is contained in:
@ -160,9 +160,9 @@ class Search
|
||||
.order("topics.bumped_at DESC")
|
||||
|
||||
if secure_category_ids.present?
|
||||
posts = posts.where("(categories.id IS NULL) OR (NOT categories.secure) OR (categories.id IN (?))", secure_category_ids)
|
||||
posts = posts.where("(categories.id IS NULL) OR (NOT categories.read_restricted) OR (categories.id IN (?))", secure_category_ids)
|
||||
else
|
||||
posts = posts.where("(categories.id IS NULL) OR (NOT categories.secure)")
|
||||
posts = posts.where("(categories.id IS NULL) OR (NOT categories.read_restricted)")
|
||||
end
|
||||
posts.limit(limit)
|
||||
end
|
||||
|
Reference in New Issue
Block a user