FS-8213 #resolve [Add support to skip permission checks on verto]

This commit is contained in:
Anthony Minessale committed 2015-09-25 20:00:03 -05:00
1 parent 73acb558cc
commit 90124856d4
5 files changed
+55 -34

No files matched your search

+18 -10
View File
@@ -2601,17 +2601,25 @@
checkDevices(runtime);
}
$.verto.init = function(obj, runtime, check) {
if(check == undefined) {
check = true;
}
$.FSRTC.checkPerms(function(status) {
if(check) {
$.verto.init = function(obj, runtime) {
if (!obj) {
obj = {};
}
if (!obj.skipPermCheck && !obj.skipDeviceCheck) {
$.FSRTC.checkPerms(function(status) {
checkDevices(runtime);
}, true, true);
} else if (obj.skipPermCheck && !obj.skipDeviceCheck) {
checkDevices(runtime);
} else {
runtime(status);
}
}, true, true);
} else if (!obj.skipPermCheck && obj.skipDeviceCheck) {
$.FSRTC.checkPerms(function(status) {
runtime(status);
}, true, true);
} else {
runtime(null);
}
}
$.verto.genUUID = function () {