remove DELETE_ME_PLS

master
Aevann 2024-04-14 12:20:22 +02:00
parent 06abf0e35e
commit db90bc4bff
5 changed files with 3 additions and 32 deletions

View File

@ -278,10 +278,6 @@ class Post(Base):
if self.distinguished and SITE_NAME == 'WPD':
return 0
#DELETE_ME_PLS
if not v and kind == "ricardo":
return 0
num = len([x for x in self.awards if x.kind == kind])
if kind in {"shit", "fireflies", "tilt"}:

View File

@ -4,20 +4,8 @@ from files.classes.comment import Comment
from files.classes.hole import Hole
from flask import request
#DELETE_ME_PLS
words_to_hide = ('israel', 'isreal', 'palest', 'muslim', 'islam', 'hamas', 'jew', 'zion', 'gaza', 'rafah', 'isis', 'terror', 'iraq', 'allah', 'mohammad', 'muhammad', 'mohammed', 'muhammed', 'mohamad', 'muhamad', 'mohamed', 'muhamed')
def can_see(user, obj):
if isinstance(obj, (Post, Comment)):
#DELETE_ME_PLS
if not user:
if obj.nsfw:
return False
if any((x in obj.body.lower() for x in words_to_hide)):
return False
if 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):
@ -48,8 +36,6 @@ def can_see(user, obj):
if obj.name == 'chudrama': return bool(user) and user.can_see_chudrama
if obj.name == 'countryclub': return bool(user) and user.can_see_countryclub
if obj.name == 'highrollerclub': return bool(user) and user.can_see_highrollerclub
#DELETE_ME_PLS
if obj.name == 'fascism': return bool(user)
elif obj.__class__.__name__ == 'User':
return not obj.shadowbanned or (user and user.id == obj.id) or (user and user.admin_level >= PERMS['USER_SHADOWBAN'])
return True

View File

@ -6,11 +6,8 @@
{% elif request.path == '/' %}
{% if IS_DKD() %}
<title>Kongrama</title>
{# DELETE_ME_PLS #}
{% elif v %}
<title>{{SITE_NAME}}{% if TAGLINES %}: {{TAGLINES|random}}{% endif %}</title>
{% else %}
<title>{{SITE_NAME}}{% if TAGLINES %}: {{TAGLINES[0]}}{% endif %}</title>
<title>{{SITE_NAME}}{% if TAGLINES %}: {{TAGLINES|random}}{% endif %}</title>
{% endif %}
{% else %}
{{super()}}

View File

@ -19,11 +19,7 @@
</h5>
</a>
{# DELETE_ME_PLS #}
{% if not v %}
{% set image = SITE_FULL_IMAGES + "/i/WPD/sidebar/622.webp?x=8" %}
{% set expanded_image = image|expand_art %}
{% elif hole and hole.sidebarurls %}
{% if hole and hole.sidebarurls %}
{% set image = hole.random_sidebar %}
{% elif IS_FISTMAS() %}
{% set image = macros.random_image("assets/events/" ~ IS_EVENT() ~ "/images/sidebar/" ~ SITE_NAME ) %}

View File

@ -15,11 +15,7 @@
</h5>
</a>
{# DELETE_ME_PLS #}
{% if not v %}
{% set image = SITE_FULL_IMAGES + "/i/rDrama/sidebar/2464.webp?x=8" %}
{% set expanded_image = image|expand_art %}
{% elif hole and hole.sidebarurls %}
{% if hole and hole.sidebarurls %}
{% set image = hole.random_sidebar %}
{% elif IS_FISTMAS() %}
{% set image = macros.random_image("assets/events/" ~ IS_EVENT() ~ "/images/sidebar/" ~ SITE_NAME ) %}