mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 08:16:51 -04:00
redirecting users to 404
This commit is contained in:
@@ -32,15 +32,7 @@ from app.utils.user import is_gov_user
|
|||||||
@main.route("/register", methods=["GET", "POST"])
|
@main.route("/register", methods=["GET", "POST"])
|
||||||
@hide_from_search_engines
|
@hide_from_search_engines
|
||||||
def register():
|
def register():
|
||||||
if current_user and current_user.is_authenticated:
|
abort(404)
|
||||||
return redirect(url_for("main.show_accounts_or_dashboard"))
|
|
||||||
|
|
||||||
form = RegisterUserForm()
|
|
||||||
if form.validate_on_submit():
|
|
||||||
_do_registration(form, send_sms=False)
|
|
||||||
return redirect(url_for("main.registration_continue"))
|
|
||||||
|
|
||||||
return render_template("views/register.html", form=form)
|
|
||||||
|
|
||||||
|
|
||||||
@main.route("/register-from-org-invite", methods=["GET", "POST"])
|
@main.route("/register-from-org-invite", methods=["GET", "POST"])
|
||||||
@@ -108,10 +100,7 @@ def _do_registration(form, send_sms=True, send_email=True, organization_id=None)
|
|||||||
|
|
||||||
@main.route("/registration-continue")
|
@main.route("/registration-continue")
|
||||||
def registration_continue():
|
def registration_continue():
|
||||||
if not session.get("user_details"):
|
abort(404)
|
||||||
return redirect(url_for(".show_accounts_or_dashboard"))
|
|
||||||
else:
|
|
||||||
raise Exception("Unexpected routing in registration_continue")
|
|
||||||
|
|
||||||
|
|
||||||
def get_invite_data_from_redis(state):
|
def get_invite_data_from_redis(state):
|
||||||
|
|||||||
Reference in New Issue
Block a user