diff --git a/ui/scripts/projects.js b/ui/scripts/projects.js index 35175c5b2b1..e07acdf3d7e 100644 --- a/ui/scripts/projects.js +++ b/ui/scripts/projects.js @@ -904,6 +904,22 @@ label: 'Enter Token', isHeader: true, addRow: false, + preFilter: function(args) { + var invitationsPresent = false; + + $.ajax({ + url: createURL('listProjectInvitations'), + data: { state: 'Pending' }, + async: false, + success: function(json) { + if (json.listprojectinvitationsresponse.count) { + invitationsPresent = true; + } + } + }); + + return !invitationsPresent; + }, createForm: { desc: 'Please enter the token that you were given in your invite e-mail.', fields: {