mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 05:29:38 -04:00
Add cancelled-invite html.
If a invited user accepts a cancelled invitation they are directed to a page telling them the invitation is cancelled. Without this they were able to register and were added to the service.
This commit is contained in:
@@ -2,7 +2,8 @@ from flask import (
|
||||
redirect,
|
||||
url_for,
|
||||
session,
|
||||
abort
|
||||
abort,
|
||||
render_template
|
||||
)
|
||||
|
||||
from notifications_python_client.errors import HTTPError
|
||||
@@ -20,6 +21,9 @@ def accept_invite(token):
|
||||
try:
|
||||
|
||||
invited_user = invite_api_client.check_token(token)
|
||||
if invited_user.status == 'cancelled':
|
||||
return render_template('views/cancelled-invitation.html')
|
||||
|
||||
existing_user = user_api_client.get_user_by_email(invited_user.email_address)
|
||||
|
||||
if existing_user:
|
||||
|
||||
Reference in New Issue
Block a user