mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
Merge branch 'master' into platform-admin
Conflicts: tests/app/main/views/test_dashboard.py
This commit is contained in:
@@ -6,10 +6,9 @@ from app import api_key_api_client
|
||||
from app.utils import user_has_permissions
|
||||
|
||||
|
||||
@main.route("/services/<service_id>/documentation")
|
||||
@login_required
|
||||
def documentation(service_id):
|
||||
return render_template('views/documentation.html', service_id=service_id)
|
||||
@main.route("/documentation")
|
||||
def documentation():
|
||||
return render_template('views/documentation.html')
|
||||
|
||||
|
||||
@main.route("/services/<service_id>/api-keys")
|
||||
|
||||
@@ -41,4 +41,7 @@ def check_and_resend_verification_code():
|
||||
# TODO there needs to be a way to generate a new session id
|
||||
user = user_api_client.get_user_by_email(session['user_details']['email'])
|
||||
user_api_client.send_verify_code(user.id, 'sms', user.mobile_number)
|
||||
return redirect(url_for('main.two_factor'))
|
||||
if user.state == 'pending':
|
||||
return redirect(url_for('main.verify'))
|
||||
else:
|
||||
return redirect(url_for('main.two_factor'))
|
||||
|
||||
@@ -16,6 +16,7 @@ from app.main.forms import TwoFactorForm
|
||||
@main.route('/two-factor', methods=['GET', 'POST'])
|
||||
def two_factor():
|
||||
# TODO handle user_email not in session
|
||||
|
||||
try:
|
||||
user_id = session['user_details']['id']
|
||||
except KeyError:
|
||||
|
||||
Reference in New Issue
Block a user