Monotone-Parent: e41f59857cafb636d38404bf829a9113c529ffd6

Monotone-Revision: 9206c6ee4874fb4fa96b7e7571eb10c5832e1f29

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-06-17T15:19:33
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2009-06-17 15:19:33 +00:00
parent 1db7523e11
commit fd86551b7c
1 changed files with 7 additions and 2 deletions

View File

@ -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;