forked from MarseyWorld/MarseyWorld
log account deletion requests on rdrama
parent
173fe441a7
commit
c825beb305
|
@ -40,8 +40,6 @@ from .currency_logs import *
|
|||
if FEATURES['IP_LOGGING']:
|
||||
from .ip_logs import *
|
||||
|
||||
if FEATURES['ACCOUNT_DELETION']:
|
||||
from .account_deletion import *
|
||||
|
||||
from .edit_logs import *
|
||||
from .chats import *
|
||||
from .account_deletion import *
|
||||
|
|
|
@ -374,6 +374,7 @@ GET_HELP_MESSAGE = "Hi there,\n\nA [concerned user](/id/{vid}) reached out to us
|
|||
|
||||
if SITE_NAME == 'rDrama':
|
||||
FEATURES['BLOCK_MUTE_EXILE_EXPIRY'] = True
|
||||
FEATURES['ACCOUNT_DELETION'] = False
|
||||
|
||||
DEFAULT_PRONOUNS = 'they/them'
|
||||
|
||||
|
@ -962,8 +963,6 @@ BADGE_BLACKLIST = PATRON_BADGES + ( # only grantable by admins higher than PERMS
|
|||
)
|
||||
|
||||
if SITE in {'rdrama.net', 'staging.rdrama.net'}:
|
||||
FEATURES['ACCOUNT_DELETION'] = False
|
||||
|
||||
NOTIFICATION_SPAM_AGE_THRESHOLD = 0.5 * 86400
|
||||
|
||||
TELEGRAM_ID = "rdramanet"
|
||||
|
|
|
@ -1175,8 +1175,6 @@ def settings_age(v):
|
|||
|
||||
return {"message": "Age successfully updated!"}
|
||||
|
||||
|
||||
if FEATURES['ACCOUNT_DELETION']:
|
||||
@app.post("/settings/delete_account")
|
||||
@limiter.limit('1/second', scope=rpath)
|
||||
@limiter.limit('1/second', scope=rpath, key_func=get_ID)
|
||||
|
@ -1188,16 +1186,15 @@ if FEATURES['ACCOUNT_DELETION']:
|
|||
if not v.verifyPass(submitted_password):
|
||||
stop(400, "Incorrect password!")
|
||||
|
||||
v.login_nonce += 1
|
||||
g.db.add(v)
|
||||
|
||||
account_deletion = AccountDeletion(user_id=v.id)
|
||||
g.db.add(account_deletion)
|
||||
|
||||
if not FEATURES['ACCOUNT_DELETION']:
|
||||
return redirect(f"{SITE_FULL_IMAGES}/i/mrburns.webp")
|
||||
|
||||
v.login_nonce += 1
|
||||
g.db.add(v)
|
||||
|
||||
return render_template("message.html",
|
||||
title="Your account will be deleted in 30 days.",
|
||||
message="You can (and should) log back in before then to cancel this. Not that we want you here or anything. Whatever bitch."), 202
|
||||
else:
|
||||
@app.get("/settings/delete_account")
|
||||
def settings_delete_account():
|
||||
return redirect(f"{SITE_FULL_IMAGES}/i/mrburns.webp")
|
|
@ -137,11 +137,7 @@
|
|||
</div>
|
||||
<div class="footer">
|
||||
<div class="d-flex">
|
||||
{% if FEATURES['ACCOUNT_DELETION'] %}
|
||||
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Request Account Deletion">
|
||||
{% else %}
|
||||
<a class="btn btn-primary ml-auto" href="/settings/delete_account">Request Account Deletion</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
Loading…
Reference in New Issue