Meteor-Vue-Enterprise-Starter icon indicating copy to clipboard operation
Meteor-Vue-Enterprise-Starter copied to clipboard

User Invitations

Open ejfrancis opened this issue 7 years ago • 0 comments

Allow user invites to be sent from the admin accounts page.

To do:

  • add UI in PageAccountsAdminInvites to browser invites, create new ones, and delete existing invites

  • create new unverified user with createUnverifiedUser.call({ invite: true })

  • in createUnverifiedUser

    • if invite provided, create a new invite in invitesCollection
    • then add _id from the new invite to user via user.userInviteId = <doc id> in Accounts.onCreateUser()
    • if invite is provided then send an invite email with link to new page to accept invite, instead of an enroll email like usual
  • create new route /accept-invite for accepting invite and creating user, pretty much copy/paste of EnrollAccountForm

    • when user submits form, call new meteor method createUserFromInvite.call()
  • in createUserFromInvite method

    • check that inviteId matches userInviteId
    • find invite from invitesCollection, mark it as accepted
    • set the user as verified
  • allow a config value to determine if user invites are required for creating accounts, or optional

ejfrancis avatar Sep 09 '17 21:09 ejfrancis