From c4c1236a9aa769d26a93777cd76239d2326f9513 Mon Sep 17 00:00:00 2001 From: Krish M <krish94@uab.edu> Date: Thu, 21 Apr 2022 14:53:57 -0500 Subject: [PATCH 1/3] 1. Moved pages certify, blocked and shibboleth to a dir - account 2. Renamed page shibboleth to unauthorized --- app/templates/{errors => account}/blocked.html | 0 app/templates/{errors => account}/certify.html | 0 .../{errors/shibboleth.html => account/unauthorized.html} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename app/templates/{errors => account}/blocked.html (100%) rename app/templates/{errors => account}/certify.html (100%) rename app/templates/{errors/shibboleth.html => account/unauthorized.html} (100%) diff --git a/app/templates/errors/blocked.html b/app/templates/account/blocked.html similarity index 100% rename from app/templates/errors/blocked.html rename to app/templates/account/blocked.html diff --git a/app/templates/errors/certify.html b/app/templates/account/certify.html similarity index 100% rename from app/templates/errors/certify.html rename to app/templates/account/certify.html diff --git a/app/templates/errors/shibboleth.html b/app/templates/account/unauthorized.html similarity index 100% rename from app/templates/errors/shibboleth.html rename to app/templates/account/unauthorized.html -- GitLab From 0855bfbb2213c5291e64ab35819937a16359cce6 Mon Sep 17 00:00:00 2001 From: Krish M <krish94@uab.edu> Date: Thu, 21 Apr 2022 14:57:09 -0500 Subject: [PATCH 2/3] removed unused app routes --- app/__init__.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index e31ca02..d4601a2 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -73,14 +73,6 @@ def create_app(config_name): cancel_msg=messages.cancel_message, error_msg=messages.error_message) - @app.route('/blocked_account') - def account_block(): - return render_template('errors/blocked.html') - - @app.route('/certify_account') - def error_certify(): - return render_template('errors/certify.html') - # misc page error catching @app.errorhandler(403) def forbidden(error): -- GitLab From f85b53354e933f02c46ee21b72857739ad5ae4f2 Mon Sep 17 00:00:00 2001 From: Krish M <krish94@uab.edu> Date: Thu, 21 Apr 2022 14:58:55 -0500 Subject: [PATCH 3/3] edited render template path for certify, blocked and unauthorized pages --- app/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index d4601a2..3dc5f8e 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -51,13 +51,13 @@ def create_app(config_name): session['return_url'] = request.args.get('redir', vars.default_referrer) if (not any(item in session['user'].get('eppa') for item in valid_eppa)): - return render_template('errors/shibboleth.html') + return render_template('account/unauthorized.html') if rc_util.check_state(session['user'].get('username')) == "blocked": - return render_template('errors/blocked.html') + return render_template('account/blocked.html') elif rc_util.check_state(session['user'].get('username')) == "certification": - return render_template('errors/certify.html', room_id=session['uid'], + return render_template('account/certify.html', room_id=session['uid'], username=session['user'].get('username'), fullname=session['user'].get('fullname'), email=session['user'].get('email'), referrer=session['return_url'], cancel_url=vars.default_referrer, -- GitLab