Skip to content
Snippets Groups Projects
Commit c6942887 authored by Ravi Tripathi's avatar Ravi Tripathi
Browse files

Updated the code using black reformatter.

parent 865ffa2e
No related branches found
No related tags found
1 merge request!60Update to only use eppa if it's provided in the headers
......@@ -44,7 +44,6 @@ def create_app(config_name):
Bootstrap(app) # allowing app to use bootstrap
def get_authorized_user():
user = {
"username": request.headers.get("REMOTE_USER"),
"fullname": request.headers.get("Displayname"),
......@@ -58,7 +57,6 @@ def create_app(config_name):
"/", methods=["GET", "POST"]
) # initial route to display the reg page
def index():
valid_eppa = app_vars.valid_eppa
if "uid" not in session:
......@@ -71,8 +69,10 @@ def create_app(config_name):
"redir", app_vars.default_referrer
)
if 'eppa' in request.headers:
if not any(item in session["user"].get("eppa") for item in valid_eppa):
if "eppa" in request.headers:
if not any(
item in session["user"].get("eppa") for item in valid_eppa
):
return render_template(
"account/unauthorized.html",
unauthorized_msg=messages.unauthorized_message,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment