hide sandshit for loggedout on WPD again

master
Aevann 2024-04-27 00:43:16 +03:00
parent 57ca35af44
commit 084e0975e5
1 changed files with 3 additions and 0 deletions

View File

@ -6,6 +6,9 @@ from flask import request
def can_see(user, obj):
if isinstance(obj, (Post, Comment)):
if not user and SITE == 'watchpeopledie.tv' and isinstance(obj, Post) and obj.hole == 'sandshit':
return False
if not can_see(user, obj.author): return False
if user and user.id == obj.author_id: return True
if isinstance(obj, Post):