Because of the dependency on Auth0 for authentication and the way the architecture and data model is currently split, onboarding suppliers and their users is a three-step process:
- Add suppliers
- Add users to Auth0 and local database, and create memberships
See this data migration for an example of a data migration that will add a list of new suppliers to the application. Note that it also outputs a data-structure that will be used in the next step.
The Import::Users
utility class can be used to
bulk-import users:
Import::User.new('/tmp/users.csv').run
See the class file for further documentation.