Created
March 14, 2012 12:19
-
-
Save AutomatedTester/2036099 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/dashboard.js b/dashboard.js | |
| index 3d2b04c..90a003e 100644 | |
| --- a/dashboard.js | |
| +++ b/dashboard.js | |
| @@ -11,6 +11,23 @@ ddoc = { | |
| ] | |
| }; | |
| +ddoc.validate_doc_update = function(newDoc, oldDoc, userCtx){ | |
| + if (newDoc._deleted === true ) { | |
| + throw ({ forbidden : "Only an admin is allowed to delete data"}); | |
| + } | |
| + | |
| + var require = function(field) { | |
| + if (!newDoc[field]) throw ({ forbidden : "This document requires the field " + field }); | |
| + } | |
| + | |
| + require("time_start"); | |
| + require("time_end"); | |
| + require("system_info"); | |
| + require("time_end"); | |
| + require("tests_passed"); | |
| + require("tests_failed"); | |
| + require("tests_skipped"); | |
| +} | |
| var functionalReportsMap = function(doc) { | |
| const REPORT_TYPES = [ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment