Require admin approval before preview if using own code
@kimberscott is already working on this.
Since Mar 2, 2020.
- Dominant language
- Python
- Stars
- 12
- Forks
- 21
- Avg merge
- 5d 19h
- Merged PRs (30d)
- 5
Description
**TL;DR**: Now that previewing a study actually saves data to the database, we should check that custom code used will not cause any problems.
**Narrative**
"As an Admin, I would like to minimize the possibility of security or functionality problems caused by previewing custom frameplayer code - e.g., saving 100MB per response or trying to edit previous responses from the same participant."
**Acceptance Criteria**
- [ ] Updated state diagram created and added to docs.
- [ ] Whenever the frameplayer repo or version are changed when saving a study, and the repo is not the default frameplayer we maintain, the study should go into a state where it is not possible to preview until approval. Building the frameplayer may be allowed or disallowed in this state.
- [ ] The study researcher should then be able to "submit" the study for preview-only approval, a separate state from submitting for approval to run. Submission should trigger an email to admins.
- [ ] An admin (same people as can approve studies to run) should be able to approve/reject the study for preview when it has been submitted for preview. This should trigger an email to study researchers.
- [ ] The preview proxy should not work when the study is in an unapproved-for-preview state. The preview view should show a clear warning/indication of why it's not possible to preview and what to do.
- [ ] Study researchers NOT using custom code should not see the option to submit for preview approval and should not require approval to preview. Their study may be in a preview-approved state immediately upon saving, for instance.
**Implementation Notes**
See https://lookit.readthedocs.io/en/develop/implementation-workflow.html
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.