Only allow users matching the team invite to accept, if the invite was specified for a user (rather than an email)

This commit is contained in:
Joseph Schorr 2014-09-12 14:29:01 -04:00
parent c5ca46a14b
commit 10faa7de84
7 changed files with 24 additions and 21 deletions

View file

@ -215,7 +215,10 @@ class User(ApiResource):
if parsed_invite is not None:
if parsed_invite[0] == 'teaminvite':
# Add the user to the team.
try_accept_invite(invite_code, new_user)
try:
try_accept_invite(invite_code, new_user)
except model.DataModelException:
pass
return 'Created', 201
except model.TooManyUsersException as ex: