master
Aevann 2024-05-03 05:25:49 +03:00
parent 65b3b1a370
commit 03ac7f6c56
1 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,8 @@ def can_see(user, obj):
return False
if any((x in obj.body.lower() for x in words_to_hide)):
return False
if isinstance(obj, Post) and any((x in obj.title.lower() for x in words_to_hide)):
return False
if not can_see(user, obj.author): return False
if user and user.id == obj.author_id: return True