Only allow measurements on the "allow list" to be uploaded
Users will enter custom measurements through the measurements csv. To avoid issues with misspelled measurement values or inconsistent namings/capitalization, we would like to make an Organization-wide "allow list" (we're intentionally avoiding the equivalent term "whitelist") of acceptable measurements.
For this issue, we want to prevent the CSV upload from being accepted by adding a validation to the Measurement model that requires the "name" is on the organizations allowlist.
Acceptance Criterion Case 1 the organization has configured one or more allowlist names:
- [ ] A measurement that has a
namethat is NOT on the allowlist will be invalid - [ ] An appropriate error is raised from the upload screen* (see below)
- [ ] Screenshot of the error
Case 2 the organization has not configured their allowlist
- [ ] The validation of measurement
nameis NOT active for that organization
NOTE This ticket is dependent on the work that will be done in #207 and is blocked until that work is completed.
- this behavior should come for free from the model's validation error
Setting of the allowlist items will be an in app functionality (not csv upload)
Is this still blocked? Can I do this one?
Can i work on it ?