From 863510e70706d4fd2c1ab01e39573b199a4be7bf Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 28 Jun 2017 10:57:18 -0400 Subject: [PATCH] (fix) Update settings of active user only Fixes #3988 --- SoObjects/SOGo/SOGoParentFolder.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SoObjects/SOGo/SOGoParentFolder.m b/SoObjects/SOGo/SOGoParentFolder.m index 3907e226d..fe6ef6077 100644 --- a/SoObjects/SOGo/SOGoParentFolder.m +++ b/SoObjects/SOGo/SOGoParentFolder.m @@ -310,7 +310,7 @@ static SoSecurityManager *sm = nil; NSMutableDictionary *folderDisplayNames; NSMutableArray *subscribedReferences; SOGoUserSettings *settings; - NSString *currentKey; + NSString *activeUser, *currentKey; SOGoUser *ownerUser; NSException *error; id o; @@ -326,6 +326,7 @@ static SoSecurityManager *sm = nil; error = nil; /* we ignore non-DB errors at this time... */ dirty = NO; + activeUser = [[context activeUser] login]; ownerUser = [SOGoUser userWithLogin: owner]; settings = [ownerUser userSettings]; @@ -346,7 +347,9 @@ static SoSecurityManager *sm = nil; // remove it from the current list. [subscribedReferences removeObject: currentKey]; [folderDisplayNames removeObjectForKey: currentKey]; - dirty = YES; + if ([owner isEqualToString: activeUser]) + // Synchronize settings only if the subscription is owned by the active user + dirty = YES; } }