diff --git a/ChangeLog b/ChangeLog index 16fad2a19..3bab83ebc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-12-08 Ludovic Marcotte + + * SoObjects/Appointments/SOGoAppointmentFolder.m + ([SOGoAppointmentFolder bareFetchFields:...]): we now + correctly handle the privacy SQL string w/o loosing + the previously defined filters. + 2008-12-05 Francis Lachapelle * SoObjects/Appointments/SOGoCalendarComponent.m diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 38f7a83fc..cb73f2957 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -457,7 +457,7 @@ static Class sogoAppointmentFolderKlass = Nil; activeUser = [context activeUser]; - if ([[self ownerInContext: context] isEqualToString: [[context activeUser] login]] + if ([[self ownerInContext: context] isEqualToString: [activeUser login]] || [[activeUser rolesForObject: self inContext: context] containsObject: SoRole_Owner]) privacySqlString = @""; @@ -513,7 +513,8 @@ static Class sogoAppointmentFolderKlass = Nil; privacySqlString = [self _privacySqlString]; if ([privacySqlString length]) - filterSqlString = [NSString stringWithFormat: @"AND (%@)", privacySqlString]; + filterSqlString = [NSString stringWithFormat: @"%@ AND (%@)", + filterSqlString, privacySqlString]; /* prepare mandatory fields */