From bf7be0c13039d973b946c8e243b4daa023677d37 Mon Sep 17 00:00:00 2001 From: cpradio Date: Sun, 16 Nov 2014 20:31:16 -0500 Subject: [PATCH] FIX: Change is_staff to is_admin to match other places where guardian.allowed_category_ids is used https://meta.discourse.org/t/security-permissions-and-messages-displayed-on-group-url/22169/17 --- app/models/group.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/group.rb b/app/models/group.rb index 498733cc1e4..2a852237f43 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -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)