forked from rDrama/rDrama
remove username reservation system
parent
6c2f2c5404
commit
89a0ff4a4b
|
@ -114,7 +114,6 @@ class User(Base):
|
|||
is_muted = Column(Boolean, default=False, nullable=False)
|
||||
club_allowed = Column(Boolean)
|
||||
login_nonce = Column(Integer, default=0)
|
||||
reserved = deferred(Column(String))
|
||||
coins = Column(Integer, default=0)
|
||||
truecoins = Column(Integer, default=0)
|
||||
procoins = Column(Integer, default=0)
|
||||
|
|
|
@ -304,9 +304,6 @@ def sign_up_post(v):
|
|||
else: email = None
|
||||
|
||||
existing_account = get_user(username, graceful=True)
|
||||
if existing_account and existing_account.reserved:
|
||||
return redirect(existing_account.url)
|
||||
|
||||
if existing_account:
|
||||
return signup_error("An account with that username already exists.")
|
||||
|
||||
|
|
|
@ -777,12 +777,6 @@ def u_username(username, v=None):
|
|||
if username != u.username:
|
||||
return redirect(SITE_FULL + request.full_path.replace(username, u.username))
|
||||
|
||||
if u.reserved:
|
||||
if request.headers.get("Authorization") or request.headers.get("xhr") or request.path.endswith(".json"):
|
||||
abort(418, f"This username is reserved for: {u.reserved}")
|
||||
|
||||
return render_template("userpage_reserved.html", u=u, v=v)
|
||||
|
||||
if v and v.id not in (u.id, DAD_ID) and u.viewers_recorded:
|
||||
g.db.flush()
|
||||
view = g.db.query(ViewerRelationship).filter_by(viewer_id=v.id, user_id=u.id).one_or_none()
|
||||
|
@ -874,12 +868,6 @@ def u_username_comments(username, v=None):
|
|||
|
||||
u = user
|
||||
|
||||
if u.reserved:
|
||||
if request.headers.get("Authorization") or request.headers.get("xhr") or request.path.endswith(".json"):
|
||||
abort(418, f"This username is reserved for: {u.reserved}")
|
||||
return render_template("userpage_reserved.html", u=u, v=v)
|
||||
|
||||
|
||||
if u.is_private and (not v or (v.id != u.id and v.admin_level < PERMS['VIEW_PRIVATE_PROFILES'] and not v.eye)):
|
||||
if request.headers.get("Authorization") or request.headers.get("xhr") or request.path.endswith(".json"):
|
||||
abort(403, "This userpage is private")
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
{% extends "default.html" %}
|
||||
|
||||
{% block pagetype %}userpage{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
<title>@{{u.username}}</title>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="row no-gutters">
|
||||
|
||||
<div class="col-12">
|
||||
|
||||
<div class="text-center py-7 py-md-8">
|
||||
|
||||
<i class="fas fa-id-card text-muted mb-5" style="font-size: 5rem;"></i>
|
||||
|
||||
|
||||
<div class="font-weight-bold text-muted">Account Reserved</div>
|
||||
<div class="text-muted">The username @{{u.username}} has been pre-emptively reserved for: {{u.reserved}}</div>
|
||||
<div class="text-muted">If that's you, or if you are their authorized representative, please contact {{SITE_NAME}} staff in order to obtain access to this account.</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block pagenav %}
|
||||
{% endblock %}
|
|
@ -930,7 +930,6 @@ CREATE TABLE public.users (
|
|||
is_banned integer DEFAULT 0 NOT NULL,
|
||||
ban_reason character varying(256),
|
||||
login_nonce integer DEFAULT 0 NOT NULL,
|
||||
reserved character varying(256),
|
||||
mfa_secret character varying(32),
|
||||
is_private boolean DEFAULT false NOT NULL,
|
||||
unban_utc integer DEFAULT 0 NOT NULL,
|
||||
|
@ -2679,4 +2678,3 @@ ALTER TABLE ONLY public.comment_option_votes
|
|||
--
|
||||
-- PostgreSQL database dump complete
|
||||
--
|
||||
|
||||
|
|
Loading…
Reference in New Issue