diff --git a/files/helpers/const.py b/files/helpers/const.py index 47c0f3231..7f2d61a92 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -133,15 +133,20 @@ AGENDAPOSTER_MSG_HTML = """

Hi week).count(), } - if site == 'rDrama': + if site == 'rDrama' or FEATURES['HOUSES']: stats2 = { "House furry members": g.db.query(User).filter(User.house.like('Furry%')).count(), "House femboy members": g.db.query(User).filter(User.house.like('Femboy%')).count(), diff --git a/files/routes/settings.py b/files/routes/settings.py index 978ac64c9..24f65a49c 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -260,7 +260,7 @@ def settings_profile_post(v): else: abort(400) house = request.values.get("house") - if house and house in ("None","Furry","Femboy","Vampire","Racist"): + if house and house in ("None","Furry","Femboy","Vampire","Racist") and FEATURES['HOUSES']: if v.house: cost = 2000 else: cost = 500 @@ -877,6 +877,8 @@ def settings_title_change(v): @limiter.limit("1/second;30/minute;200/hour;1000/day", key_func=lambda:f'{SITE}-{session.get("lo_user")}') @auth_required def settings_pronouns_change(v): + if not FEATURES['PRONOUNS']: + abort(403) pronouns = request.values.get("pronouns").replace("𒐪","").lower().strip() diff --git a/files/routes/users.py b/files/routes/users.py index b946144d4..7e4dd837f 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -376,6 +376,9 @@ def downvoting(v, username): @limiter.limit("1/second;5/day", key_func=lambda:f'{SITE}-{session.get("lo_user")}') @auth_required def suicide(v, username): + if not FEATURES['USERS_SUICIDE']: + abort(403) + user = get_user(username) suicide = f"Hi there,\n\nA [concerned user](/id/{v.id}) reached out to us about you.\n\nWhen you're in the middle of something painful, it may feel like you don't have a lot of options. But whatever you're going through, you deserve help and there are people who are here for you.\n\nThere are resources available in your area that are free, confidential, and available 24/7:\n\n- Call, Text, or Chat with Canada's [Crisis Services Canada](https://www.crisisservicescanada.ca/en/)\n- Call, Email, or Visit the UK's [Samaritans](https://www.samaritans.org/)\n- Text CHAT to America's [Crisis Text Line](https://www.crisistextline.org/) at 741741.\nIf you don't see a resource in your area above, the moderators keep a comprehensive list of resources and hotlines for people organized by location. Find Someone Now\n\nIf you think you may be depressed or struggling in another way, don't ignore it or brush it aside. Take yourself and your feelings seriously, and reach out to someone.\n\nIt may not feel like it, but you have options. There are people available to listen to you, and ways to move forward.\n\nYour fellow users care about you and there are people who want to help." if not v.shadowbanned: diff --git a/files/routes/votes.py b/files/routes/votes.py index efb15f62c..d198c4fe3 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -6,7 +6,7 @@ from flask import * from files.__main__ import app, limiter, cache @app.get("/votes/") -@auth_required +@admin_level_required(PERMS['VOTES_VISIBLE']) def vote_info_get(v, link): try: if "t2_" in link: thing = get_post(int(link.split("t2_")[1]), v=v) @@ -199,4 +199,4 @@ def api_vote_comment(comment_id, new, v): comment.realupvotes = g.db.query(CommentVote).filter_by(comment_id=comment.id, real=True).count() if comment.author.progressivestack: comment.realupvotes *= 2 g.db.add(comment) - return "", 204 \ No newline at end of file + return "", 204 diff --git a/files/templates/comments.html b/files/templates/comments.html index 3103a9713..176b233e7 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -192,7 +192,7 @@ {% if c.ghost %} 👻 {% else %} - {% if SITE_NAME=='rDrama' and c.author.house %} + {% if FEATURES['HOUSES'] and c.author.house %} House {{c.author.house}} {% endif %} @@ -206,7 +206,7 @@ {% endif %} {{c.author_name}} - {% if SITE_NAME == 'rDrama' %} + {% if FEATURES['PRONOUNS'] %} {{c.author.pronouns}} {% endif %} {% if c.author.customtitle %} @@ -437,7 +437,7 @@ {% endif %} - {% if not c.ghost or v.id == AEVANN_ID %}Votes{% endif %} + {% if v and ((not c.ghost and v.admin_level >= PERMS['VOTES_VISIBLE']) or v.id == AEVANN_ID) %}Votes{% endif %} Context @@ -644,7 +644,7 @@

- {% if SITE_NAME == 'rDrama' %} + {% if FEATURES['PRONOUNS'] %}

{{u.pronouns}}

{% endif %} @@ -187,11 +187,13 @@ Follow Message - Get them help - Gift coins - {% if FEATURES['PROCOINS'] %} + {% if FEATURES['USERS_SUICIDE'] -%} + Get Them Help + {%- endif %} + Gift Coins + {% if FEATURES['PROCOINS'] -%} Gift Marseybux - {% endif %} + {%- endif %} Block @@ -399,7 +401,7 @@ {% endif %} - {% if SITE_NAME=='rDrama' and u.house %} + {% if FEATURES['HOUSES'] and u.house %} House {{u.house}} {% endif %} @@ -416,7 +418,7 @@ Follows you {% endif %} - {% if SITE_NAME == 'rDrama' %} + {% if FEATURES['PRONOUNS'] %}

{{u.pronouns}}

{% endif %} @@ -511,11 +513,13 @@ Follow Message - Get them help - Gift coins - {% if FEATURES['PROCOINS'] %} + {% if FEATURES['USERS_SUICIDE'] -%} + Get Them Help + {%- endif %} + Gift Coins + {% if FEATURES['PROCOINS'] -%} Gift Marseybux - {% endif %} + {%- endif %} Block