mirror of
https://github.com/mupen64plus-ae/acra-storage.git
synced 2024-11-23 05:29:44 +00:00
c76c761950
- Broadened package name for signature characterization (lump together multiple published versions) - Added view by signature - Set minimum version for receiving reports - Changed minimum year to 2013 for reports per day - Added git settings
13 lines
528 B
JavaScript
13 lines
528 B
JavaScript
function(newDoc, oldDoc, userCtx) {
|
|
|
|
var MIN_APP_VERSION_CODE = 34;
|
|
|
|
if(userCtx.roles.indexOf("_admin") < 0 && userCtx.roles.indexOf("reporter") < 0 && userCtx.roles.indexOf("_writer") < 0) {
|
|
throw({"unauthorized": "You may only post reports with reporter, _admin or _writer role "});
|
|
}
|
|
|
|
if(newDoc.APP_VERSION_CODE && newDoc.APP_VERSION_CODE < MIN_APP_VERSION_CODE) {
|
|
throw({"forbidden": "Reports from application version code lesser than " + MIN_APP_VERSION_CODE + " are not allowed anymore."});
|
|
}
|
|
}
|