summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js
Unidiff
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js') (more/less context) (show whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js b/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js
index 326022c..b806cb7 100644
--- a/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js
+++ b/frontend/gamma/js/Clipperz/PM/Proxy/Proxy.Offline.DataStore.js
@@ -272,25 +272,25 @@ Clipperz.Base.extend(Clipperz.PM.Proxy.Offline.DataStore, Object, {
272 return result; 272 return result;
273 }, 273 },
274 274
275 //------------------------------------------------------------------------- 275 //-------------------------------------------------------------------------
276 276
277 '_registration': function(aConnection, someParameters) { 277 '_registration': function(aConnection, someParameters) {
278 if (this.isReadOnly() == false) { 278 if (this.isReadOnly() == false) {
279 if (typeof(this.data()['users'][someParameters['credentials']['C']]) == 'undefined') { 279 if (typeof(this.data()['users'][someParameters['credentials']['C']]) == 'undefined') {
280 this.data()['users'][someParameters['credentials']['C']] = { 280 this.data()['users'][someParameters['credentials']['C']] = {
281 's': someParameters['credentials']['s'], 281 's': someParameters['credentials']['s'],
282 'v': someParameters['credentials']['v'], 282 'v': someParameters['credentials']['v'],
283 'version':someParameters['credentials']['version'], 283 'version':someParameters['credentials']['version'],
284 'lock': Clipperz.Crypto.Base.generateRandomSeed(), 284 // 'lock': Clipperz.Crypto.Base.generateRandomSeed(),
285 'userDetails': someParameters['user']['header'], 285 'userDetails': someParameters['user']['header'],
286 'statistics': someParameters['user']['statistics'], 286 'statistics': someParameters['user']['statistics'],
287 'userDetailsVersion':someParameters['user']['version'], 287 'userDetailsVersion':someParameters['user']['version'],
288 'records':{} 288 'records':{}
289 } 289 }
290 } else { 290 } else {
291 throw "user already exists"; 291 throw "user already exists";
292 } 292 }
293 } else { 293 } else {
294 throw Clipperz.PM.Proxy.Offline.DataStore.exception.ReadOnly; 294 throw Clipperz.PM.Proxy.Offline.DataStore.exception.ReadOnly;
295 } 295 }
296 296
@@ -560,25 +560,25 @@ Clipperz.Base.extend(Clipperz.PM.Proxy.Offline.DataStore, Object, {
560 } 560 }
561 */ //===================================================================== 561 */ //=====================================================================
562 } else if (someParameters.message == 'saveChanges') { 562 } else if (someParameters.message == 'saveChanges') {
563 if (this.isReadOnly() == false) { 563 if (this.isReadOnly() == false) {
564 var i, c; 564 var i, c;
565 565
566 if (aConnection['userData']['lock']!= someParameters['parameters']['user']['lock']) { 566 if (aConnection['userData']['lock']!= someParameters['parameters']['user']['lock']) {
567 throw "the lock attribute is not processed correctly" 567 throw "the lock attribute is not processed correctly"
568 } 568 }
569 569
570 aConnection['userData']['userDetails'] = someParameters['parameters']['user']['header']; 570 aConnection['userData']['userDetails'] = someParameters['parameters']['user']['header'];
571 aConnection['userData']['statistics'] = someParameters['parameters']['user']['statistics']; 571 aConnection['userData']['statistics'] = someParameters['parameters']['user']['statistics'];
572 aConnection['userData']['userDetailsVersions']= someParameters['parameters']['user']['version']; 572 aConnection['userData']['userDetailsVersion']= someParameters['parameters']['user']['version'];
573 573
574 c = someParameters['parameters']['records']['updated'].length; 574 c = someParameters['parameters']['records']['updated'].length;
575 for (i=0; i<c; i++) { 575 for (i=0; i<c; i++) {
576 var currentRecord; 576 var currentRecord;
577 var currentRecordData; 577 var currentRecordData;
578 578
579 currentRecordData = someParameters['parameters']['records']['updated'][i]; 579 currentRecordData = someParameters['parameters']['records']['updated'][i];
580 currentRecord = aConnection['userData']['records'][currentRecordData['record']['reference']]; 580 currentRecord = aConnection['userData']['records'][currentRecordData['record']['reference']];
581 581
582 if ( 582 if (
583 (typeof(aConnection['userData']['records'][currentRecordData['record']['reference']]) == 'undefined') 583 (typeof(aConnection['userData']['records'][currentRecordData['record']['reference']]) == 'undefined')
584 && 584 &&