mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-05 23:28:24 -04:00
Short circuit if already a team member
It would be confusing if people got invited twice, so let’s tell people if someone’s already been invited.
This commit is contained in:
@@ -65,6 +65,11 @@ def invite_user(service_id, user_id=None):
|
||||
|
||||
if user_id:
|
||||
user_to_invite = User.from_id(user_id)
|
||||
if user_to_invite.belongs_to_service(current_service.id):
|
||||
return render_template(
|
||||
'views/user-already-invited.html',
|
||||
user_to_invite=user_to_invite,
|
||||
)
|
||||
form.email_address.data = user_to_invite.email_address
|
||||
else:
|
||||
user_to_invite = None
|
||||
|
||||
Reference in New Issue
Block a user