work in progress, add fidelity to category group permissions (full, create posts, readonly)

This commit is contained in:
Sam
2013-07-14 11:24:16 +10:00
parent 8d947535a8
commit ecf17cfebb
38 changed files with 349 additions and 126 deletions

View File

@ -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