From fd86551b7ca194b89659ef53edcefaf06538e049 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 17 Jun 2009 15:19:33 +0000 Subject: [PATCH] Monotone-Parent: e41f59857cafb636d38404bf829a9113c529ffd6 Monotone-Revision: 9206c6ee4874fb4fa96b7e7571eb10c5832e1f29 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-06-17T15:19:33 Monotone-Branch: ca.inverse.sogo --- SoObjects/Appointments/SOGoAppointmentFolder.m | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 69ef36604..c05431067 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -462,7 +462,8 @@ static NSArray *reducedReportQueryFields = nil; [self initializeQuickTablesAclsInContext: context]; grantedClasses = [NSMutableArray arrayWithCapacity: 3]; deniedClasses = [NSMutableArray arrayWithCapacity: 3]; - for (currentClass = 0; currentClass < iCalAccessClassCount; currentClass++) + for (currentClass = 0; + currentClass < iCalAccessClassCount; currentClass++) { classNumber = [NSNumber numberWithInt: currentClass]; if (userCanAccessObjectsClassifiedAs[currentClass]) @@ -477,10 +478,14 @@ static NSArray *reducedReportQueryFields = nil; privacySqlString = [NSString stringWithFormat: @"c_classification != %@", [deniedClasses objectAtIndex: 0]]; - else + else if (grantedCount == 1) privacySqlString = [NSString stringWithFormat: @"c_classification == %@", [grantedClasses objectAtIndex: 0]]; + else + /* We prevent any event/task from being listed. There must be a better + way... */ + privacySqlString = @"0 == 1"; } return privacySqlString;