User mapping - send email when CSV processing finished
About
Once the user mapping CSV added in #455901 (closed) has finished processing (whether successful or failed), we should send an email to the user who uploaded the CSV.
Designs: #451028[Email_-_CSV_Upload.png]
Note: The frontend for this was already implemented in an earlier MR, so would be easiest if whoever works on backend to also update the copy since it's a small change (see comment), review design and update the copy.
Related issue: User mapping FE - Add filtering by status to pl... (#461529 - closed) - but it's not blocking this one.
FE part of this issue is done, BE part remains, see comment.
Test cases
-
If the group owner submitted well formatted and correct CSV file, they receive email upon end of file processing informing them about results. -
If in a CSV file a group owner wrote username of anyone else than active human user existing on destination (e.g. of bot user or of inactive user) in GitLab username column, row with this username should not be processed and error message shown in the email sent to group owner. -
If in a CSV file a group owner wrote email address that was not a public email address of active human user existing on destination (e.g. of bot user or of inactive user or of active human user, but not their public email) in GitLab public email column, row with this username should not be processed and error message shown in the email sent to group owner. -
If a group owner would try to map more than one placeholder to an active human user, for example by uploading more than one CSV file (to workaround the first safeguard), such mapping should fail and error message be shown.
Edited by James Nutt