From 80419f5ea7ec6978b51d779334bff9b31222c3bf Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Sat, 19 Sep 2009 20:07:31 +0000 Subject: [PATCH] Monotone-Parent: 8491fd7ecec899497401733993e0cfd27a87ca51 Monotone-Revision: 23e06db474789eb4ae4db47b1d4dff4b5d7fcb49 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-09-19T20:07:31 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 12 ++++++++++++ SoObjects/SOGo/SOGoUser.m | 17 ++++------------- SoObjects/SOGo/SOGoUserDefaults.h | 4 +--- SoObjects/SOGo/SOGoUserDefaults.m | 11 +++-------- 4 files changed, 20 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0f0763e21..4130e66fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2009-09-19 Wolfgang Sourdeau + + * SoObjects/SOGo/SOGoUserDefaults.m + (-initWithTableURL:uid:fieldName:): removed the "shouldPropagete" + parameter. + (-primaryStoreProfile): we now propagate the values in the cache + unconditionally. + + * SoObjects/SOGo/SOGoUser.m (-initWithLogin:roles:trust:): + the trust no longer prevent user settings and defaults to + propagate in the cache, since we no longer use gdnc for it. + 2009-09-18 Wolfgang Sourdeau * UI/WebServerResources/generic.js (onLoadHandler): don't trigger diff --git a/SoObjects/SOGo/SOGoUser.m b/SoObjects/SOGo/SOGoUser.m index 23cb2bdfd..3745cd118 100644 --- a/SoObjects/SOGo/SOGoUser.m +++ b/SoObjects/SOGo/SOGoUser.m @@ -265,13 +265,6 @@ _timeValue (NSString *key) _defaults = nil; _settings = nil; - // We propagate the cache if we do NOT trust the login names. - // When trusting login names, we 'assume' we're dealing with a - // super user doing kungfu with the system. We definitively don't - // want to propagate the cache to other sogod instances when - // dealing with massive number of ops. - propagateCache = !b; - if ([newLogin isEqualToString: @"anonymous"] || [newLogin isEqualToString: @"freebusy"]) realUID = newLogin; @@ -461,9 +454,8 @@ _timeValue (NSString *key) SOGoUserDefaults *o; o = [[SOGoUserDefaults alloc] initWithTableURL: SOGoProfileURL - uid: login - fieldName: @"c_defaults" - shouldPropagate: propagateCache]; + uid: login + fieldName: @"c_defaults"]; return o; } @@ -473,9 +465,8 @@ _timeValue (NSString *key) SOGoUserDefaults *o; o = [[SOGoUserDefaults alloc] initWithTableURL: SOGoProfileURL - uid: login - fieldName: @"c_settings" - shouldPropagate: propagateCache]; + uid: login + fieldName: @"c_settings"]; return o; } diff --git a/SoObjects/SOGo/SOGoUserDefaults.h b/SoObjects/SOGo/SOGoUserDefaults.h index cf8139954..2641a71be 100644 --- a/SoObjects/SOGo/SOGoUserDefaults.h +++ b/SoObjects/SOGo/SOGoUserDefaults.h @@ -44,7 +44,6 @@ NSString *uid; NSString *fieldName; NSMutableDictionary *values; - BOOL propagateCache; struct { @@ -56,8 +55,7 @@ - (id) initWithTableURL: (NSURL *) theURL uid: (NSString *) theUID - fieldName: (NSString *) theFieldName - shouldPropagate: (BOOL) b; + fieldName: (NSString *) theFieldName; /* value access */ - (void) setValues: (NSDictionary *) theValues; diff --git a/SoObjects/SOGo/SOGoUserDefaults.m b/SoObjects/SOGo/SOGoUserDefaults.m index 631ddee41..adf651d48 100644 --- a/SoObjects/SOGo/SOGoUserDefaults.m +++ b/SoObjects/SOGo/SOGoUserDefaults.m @@ -46,7 +46,6 @@ static NSString *uidColumnName = @"c_uid"; - (id) initWithTableURL: (NSURL *) theURL uid: (NSString *) theUID fieldName: (NSString *) theFieldName - shouldPropagate: (BOOL) b { if ((self = [self init])) { @@ -57,7 +56,6 @@ static NSString *uidColumnName = @"c_uid"; url = [theURL copy]; uid = [theUID copy]; defFlags.ready = YES; - propagateCache = b; } else { @@ -291,12 +289,9 @@ static NSString *uidColumnName = @"c_uid"; [self errorWithFormat: @"failed to generate SQL for storing defaults"]; if (rc) - { - if (propagateCache) - [[SOGoCache sharedCache] cacheValues: values - ofType: ([fieldName isEqualToString: @"c_defaults"] ? @"defaults" : @"settings") - forLogin: uid]; - } + [[SOGoCache sharedCache] cacheValues: values + ofType: ([fieldName isEqualToString: @"c_defaults"] ? @"defaults" : @"settings") + forLogin: uid]; return rc; }