From c79092114166f0e903ecfa83ad63c3db257bcab8 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl Date: Mon, 20 May 2024 11:24:39 -0700 Subject: [PATCH] Update app/main/views/sign_in.py Co-authored-by: Carlo Costino --- app/main/views/sign_in.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/app/main/views/sign_in.py b/app/main/views/sign_in.py index 23a9cefd4..35f0e5251 100644 --- a/app/main/views/sign_in.py +++ b/app/main/views/sign_in.py @@ -181,22 +181,3 @@ def sign_in(): @login_manager.unauthorized_handler def sign_in_again(): return redirect(url_for("main.sign_in", next=request.path)) - - -def check_for_gov_email_address(user_email): - # We could try to check that it is a government email at the time the invite is - # sent, but due to the way login.gov allows multiple emails, it would not be effective. - # We track the login.gov user by their uuid, so if they have a login.gov account - # with a .gov email address and a .com email address, the .com address will work without - # having a check here. - if ( - user_email.lower().endswith(".gov") - or user_email.lower().endswith(".mil") - or user_email.lower().endswith(".si.edu") - ): - # everything is good, proceed - pass - else: - current_app.logger.warning("invited user has a non-government email address.") - flash("You must use a government email address.") - abort(403)