diff --git a/app/__init__.py b/app/__init__.py index e31ca02d5d743dc75de9d435561482b82b9ffcdc..3dc5f8e3057b317ec2c7851e812367792b57e4f8 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, @@ -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): 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