AmericanRedCross / disaster-asset-manager

node app to make building the mapfolio a lot easier
0 stars 1 forks source link

bulk import of new users #7

Closed danbjoseph closed 9 years ago

danbjoseph commented 9 years ago

allow super users to upload a csv for bulk registration of new users (e.g. reformat a contact list at the start of a response)

kevinlustig commented 9 years ago

Importing and exporting of users and assets is now available.

Users with super powers can export anything.

Users with user powers can export their own and all public assets. They cannot export users.

Users with user powers can import assets, but they cannot import users.

Whichever user imports assets will be assigned as the owner/author of that asset.

Imports must be in CSV format, and rows not containing values for required fields (as defined by the Mongoose schema for the relevant data type) will be rejected with an error message. Imports can partially succeed - that is, rows that meet required criteria will succeed from the same file in which rows that don't meet required criteria fail. Both a success message and an error message will be provided in that case.

One major weakness of importing and exporting right now is that asset files can't be moved in and out alongside the CSV. So, you may import a list of assets with all their metadata, but you will still have to go through and manually upload all of the files one at a time. When exporting, only file (and thumbnail) IDs are exported. If you were to import these into a new system, the file IDs would be invalid references, assuming those files don't exist with those IDs in that other system. There are ways to overcome this - uploading a ZIP archive of files along with the CSV, providing URLs for files instead of actual files, etc. - but for now, files will need to be a separate action.