diff --git a/files/classes/mod_logs.py b/files/classes/mod_logs.py index 8d285a5ba..df0f890d4 100644 --- a/files/classes/mod_logs.py +++ b/files/classes/mod_logs.py @@ -164,6 +164,16 @@ ACTIONTYPES={ "icon": "fa-columns", "color": "bg-muted", }, + "disable_signups": { + "str": "disabled signups", + "icon": "fa-user-slash", + "color": "bg-danger", + }, + "enable_signups": { + "str": "enabled signups", + "icon": "fa-user", + "color": "bg-success", + }, "ban_user":{ "str":'banned user {self.target_link}', "icon":"fa-user-slash", diff --git a/files/routes/admin.py b/files/routes/admin.py index b54172231..f797e25a1 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -361,7 +361,7 @@ def admin_home(v): return render_template("CHRISTMAS/admin/admin_home.html", actions=actions, v=v, x=x) @app.post("/admin/disablesignups") -@admin_level_required(2) +@admin_level_required(3) @validate_formkey def disablesignups(v): with open('disablesignups', 'r') as f: content = f.read() @@ -369,9 +369,21 @@ def disablesignups(v): with open('disablesignups', 'w') as f: if content == "yes": f.write("no") - return {"message": "Signups enabed!"} + ma = ModAction( + kind="enable_signups", + user_id=v.id, + ) + g.db.add(ma) + g.db.commit() + return {"message": "Signups enabled!"} else: f.write("yes") + ma = ModAction( + kind="disable_signups", + user_id=v.id, + ) + g.db.add(ma) + g.db.commit() return {"message": "Signups disabled!"} @app.get("/admin/badge_grant") diff --git a/files/routes/static.py b/files/routes/static.py index 136aa8ece..d73909910 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -22,6 +22,11 @@ def privacy(v): def emojis(v): return render_template("marseys.html", v=v, marseys=marseys.items()) +@app.get("/terms") +@auth_desired +def terms(v): + return render_template("terms.html", v=v) + @app.get('/sidebar') @auth_desired def sidebar(v): diff --git a/files/templates/admin/admin_home.html b/files/templates/admin/admin_home.html index 0d2300078..b20b48448 100644 --- a/files/templates/admin/admin_home.html +++ b/files/templates/admin/admin_home.html @@ -56,9 +56,11 @@
  • Edit Sidebar
  • -
    - - -
    +{% if v.admin_level > 2 %} +
    + + +
    +{% endif %} {% endblock %} \ No newline at end of file diff --git a/files/templates/login.html b/files/templates/login.html index 4d62866d3..283a69bf2 100644 --- a/files/templates/login.html +++ b/files/templates/login.html @@ -88,6 +88,13 @@ + +{% if g.webview %}
    + + +
    +{% endif %}
    Don't have an account? Sign up
    diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html index f97c9e0bf..11c408284 100644 --- a/files/templates/sign_up.html +++ b/files/templates/sign_up.html @@ -112,7 +112,12 @@
    + {% if g.webview %} + href="/terms">terms of use + {% else %} + href="/sidebar">rules + {% endif %} +
    {% if hcaptcha %} diff --git a/files/templates/terms.html b/files/templates/terms.html new file mode 100644 index 000000000..ab6e91ae4 --- /dev/null +++ b/files/templates/terms.html @@ -0,0 +1,51 @@ +{% extends "default.html" %} + +{% block title %} +{{'SITE_NAME' | app_config}} Terms of use + +{% endblock %} + +{% block content %} +
    +
    +
    +
    +
    +
    {{'SITE_NAME'|app_config}} Terms of use
    + +
    +

    By using Drama you agree to abstain from posting or submitting to any of the following. Additionally, you warrant that anything posted or submitted by you complies with this code of conduct.

    + +
    + +

    Legal

    + +

    Copyright: You may not post anything copyrighted by another party or material not properly licensed to you.

    + +

    United States Law: You may not post anything not legal to publish within or export from the United States of America.

    + +

    Safety

    + +

    Harrasment: You may not post anything that harasses or encourages of others either online or offline.

    + +

    Personal Information: Posting or publishing personal or confidential information is stricly prohibited.

    + +

    Solicitation: You may not post anything that solicits transactions

    + +

    Malicious material: Anything that is digitally malicious is strictly prohibited from being posted.

    + +

    Impersonation: You many not post anything that impersonates other Drama users, moderators, or administrations.

    + +

    Spam: Spam material is strictly prohibited from being posted on Drama.

    + +

    Sexuality

    + +

    Pornographic material: You may not post anything that is pornographic in nature. We value Drama as an Internet-based public square. And we qualify pornographic material as indecent exposure in such a setting.

    + +

    Sexual or sexually suggestive material: Any sexual or sexually suggestive material must be marked "NSFW"

    + +

    Content involving minors: Drama has zero tolerance for sexual or sexually suggestive material involving minors. Any material that violates this rule will result in a permanent ban.

    + +
    +
    +{% endblock %} \ No newline at end of file