FIX: Notify staged users about private categories (#8765)

group membership and `CategoryUser` notification level should be
respected to determine whether to notify staged users about activity in
private categories, instead of only ever generating notifications for staged
users' own topics (which has been the behaviour since
0c4ac2a7bc)
This commit is contained in:
mintsaxon
2020-01-22 21:33:25 +02:00
committed by Roman Rizzi
parent 1de5b4ad64
commit 4b54791bcc
2 changed files with 30 additions and 2 deletions
+1 -1
View File
@@ -154,7 +154,7 @@ module TopicGuardian
category = topic.category
can_see_category?(category) &&
(!category.read_restricted || !is_staged? || topic.user == user)
(!category.read_restricted || !is_staged? || secure_category_ids.include?(category.id) || topic.user == user)
end
def can_get_access_to_topic?(topic)