Merge pull request #2971 from cpradio/pr-fix-allowed-category-ids-for-group-posts

FIX: Change is_staff to is_admin for group posts to match other places
This commit is contained in:
Jeff Atwood 2014-11-16 18:51:31 -08:00
commit c059352484
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ class Group < ActiveRecord::Base
.where('topics.archetype <> ?', Archetype.private_message)
.where(post_type: Post.types[:regular])
unless guardian.is_staff?
unless guardian.is_admin?
allowed_ids = guardian.allowed_category_ids
if allowed_ids.length > 0
result = result.where('topics.category_id IS NULL or topics.category_id IN (?)', allowed_ids)