diff --git a/files/classes/user.py b/files/classes/user.py index 03f5dea05..dcc90d67e 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -1243,6 +1243,23 @@ class User(Base): return False + @property + @lazy + def can_see_donate_service(self): + if DONATE_LINK == DEFAULT_CONFIG_VALUE: + return False + + if self.can_see_restricted_holes != None: + return self.can_see_restricted_holes + + if self.chud == 1: return False + + if self.truescore >= TRUESCORE_DONATE_MINIMUM: return True + + if self.patron: return True + + return False + @property @lazy def can_post_in_ghost_threads(self): diff --git a/files/templates/donate.html b/files/templates/donate.html index b93ce0f47..658e33662 100644 --- a/files/templates/donate.html +++ b/files/templates/donate.html @@ -2,7 +2,7 @@ {% block pagetitle %}Donate{% endblock %} {% block content %}
- {% set can_see = DONATE_LINK != DEFAULT_CONFIG_VALUE and v and v.can_see_countryclub and v.chud != 1 %} + {% set can_see = v and v.can_see_donate_service %}

Donation Methods

diff --git a/files/templates/settings/personal.html b/files/templates/settings/personal.html index 94f1852ec..96d047e28 100644 --- a/files/templates/settings/personal.html +++ b/files/templates/settings/personal.html @@ -13,7 +13,7 @@

You're a {{TIER_TO_NAME[v.patron] if v.patron else "freeloader"}}!

{% if v.patron %} Thanks ily! <3{% endif %} - {% if not v.patron and v.truescore >= TRUESCORE_DONATE_MINIMUM and DONATE_LINK != DEFAULT_CONFIG_VALUE %} + {% if not v.patron and v.can_see_donate_service %}

To stop freeloading, first verify your email, then support us on {{DONATE_SERVICE}} with the same email, and then click "Claim Donation Rewards" here

{% elif not v.patron %}

To stop freeloading, you can donate by crypto. If you do that, please let us know by sending us the transaction id via modmail so we can give you your donation rewards manually!

diff --git a/files/templates/settings/security.html b/files/templates/settings/security.html index cbc27458c..de01142d9 100644 --- a/files/templates/settings/security.html +++ b/files/templates/settings/security.html @@ -43,7 +43,7 @@ {% endif %}
- {% if v.truescore >= TRUESCORE_DONATE_MINIMUM and DONATE_LINK != DEFAULT_CONFIG_VALUE %} + {% if v.can_see_donate_service %}
Must be same email as the one you used to donate on {{DONATE_SERVICE}}