From 7de98572070571d1dbfee0d84abc29ead1abfd78 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 17 Dec 2021 07:28:04 +0200 Subject: [PATCH] fdfsd --- files/routes/posts.py | 4 ++-- files/templates/CHRISTMAS/modals/ModalSubmissionActions.html | 2 +- .../CHRISTMAS/modals/ModalSubmissionListingActions.html | 2 +- files/templates/CHRISTMAS/submission/SubmissionActions.html | 2 +- .../CHRISTMAS/submission/SubmissionListingActions.html | 2 +- files/templates/CHRISTMAS/submit.html | 2 +- files/templates/submission.html | 4 ++-- files/templates/submission_listing.html | 4 ++-- files/templates/submit.html | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index ea41430be..70ced6043 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -32,8 +32,8 @@ if path.exists(f'snappy_{site_name}.txt'): @auth_required def toggle_club(pid, v): + if v.club_banned: abort(403) post = get_post(pid) - if post.author_id != v.id and v.admin_level == 0: abort(403) post.club = not post.club @@ -943,7 +943,7 @@ def submit_post(v): if request.headers.get("Authorization"): return {"error": reason}, 403 else: return render_template("submit.html", v=v, error=reason, title=title, url=url, body=request.values.get("body", "")), 403 - if v.paid_dues: club = bool(request.values.get("club","")) + if not v.club_banned: club = bool(request.values.get("club","")) else: club = False if embed and len(embed) > 1500: embed = None diff --git a/files/templates/CHRISTMAS/modals/ModalSubmissionActions.html b/files/templates/CHRISTMAS/modals/ModalSubmissionActions.html index a36528e0d..e770dc2c3 100644 --- a/files/templates/CHRISTMAS/modals/ModalSubmissionActions.html +++ b/files/templates/CHRISTMAS/modals/ModalSubmissionActions.html @@ -93,7 +93,7 @@ - {% if v.admin_level > 1 or v.id == p.author.id and v.paid_dues %} + {% if v.admin_level > 1 or v.id == p.author.id and not v.club_banned %}
  • - {% if v.admin_level > 1 or v.id == p.author.id and v.paid_dues %} + {% if v.admin_level > 1 or v.id == p.author.id and not v.club_banned %}
  • - {% if v.paid_dues %} + {% if not v.club_banned %}
  • diff --git a/files/templates/submission.html b/files/templates/submission.html index 4d85a48f3..082b5492f 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -219,7 +219,7 @@ {% endif %} - {% if v.admin_level > 1 or v.id == p.author.id and v.paid_dues %} + {% if v.admin_level > 1 or v.id == p.author.id and not v.club_banned %} {% endif %} @@ -545,7 +545,7 @@ {% endif %} {% if v %} - {% if v.admin_level > 1 or v.id == p.author.id and v.paid_dues %} + {% if v.admin_level > 1 or v.id == p.author.id and not v.club_banned %} Mark club Unmark club {% endif %} diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index e96098dc3..923396c54 100644 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -250,7 +250,7 @@ {% endif %} {% if v %} - {% if v.admin_level > 1 or v.id == p.author.id and v.paid_dues %} + {% if v.admin_level > 1 or v.id == p.author.id and not v.club_banned %} Mark club Unmark club {% endif %} @@ -406,7 +406,7 @@ - {% if v.admin_level > 1 or v.id == p.author.id and v.paid_dues %} + {% if v.admin_level > 1 or v.id == p.author.id not v.club_banned %} {% endif %} diff --git a/files/templates/submit.html b/files/templates/submit.html index 272360b26..4fc7f89d6 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -138,7 +138,7 @@ - {% if v.paid_dues %} + {% if not v.club_banned %}