Fixed the non-filtering of recurrence exceptions
This commit is contained in:
parent
2643cff3f9
commit
50a84ceafa
|
@ -219,29 +219,13 @@
|
||||||
|
|
||||||
- (NSString *) secureContentAsString
|
- (NSString *) secureContentAsString
|
||||||
{
|
{
|
||||||
iCalCalendar *tmpCalendar;
|
|
||||||
iCalRepeatableEntityObject *tmpComponent;
|
iCalRepeatableEntityObject *tmpComponent;
|
||||||
// NSArray *roles;
|
iCalCalendar *tmpCalendar;
|
||||||
|
NSArray *allComponents;
|
||||||
SoSecurityManager *sm;
|
SoSecurityManager *sm;
|
||||||
NSString *iCalString;
|
NSString *iCalString;
|
||||||
|
|
||||||
// uid = [[context activeUser] login];
|
int i;
|
||||||
// roles = [self aclsForUser: uid];
|
|
||||||
// if ([roles containsObject: SOGoCalendarRole_Organizer]
|
|
||||||
// || [roles containsObject: SOGoCalendarRole_Participant]
|
|
||||||
// || [roles containsObject: SOGoCalendarRole_ComponentViewer])
|
|
||||||
// calContent = content;
|
|
||||||
// else if ([roles containsObject: SOGoCalendarRole_ComponentDAndTViewer])
|
|
||||||
// {
|
|
||||||
// tmpCalendar = [[self calendar: NO] copy];
|
|
||||||
// tmpComponent = (iCalRepeatableEntityObject *)
|
|
||||||
// [tmpCalendar firstChildWithTag: [self componentTag]];
|
|
||||||
// [self _filterComponent: tmpComponent];
|
|
||||||
// calContent = [tmpCalendar versitString];
|
|
||||||
// [tmpCalendar release];
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// calContent = nil;
|
|
||||||
|
|
||||||
sm = [SoSecurityManager sharedSecurityManager];
|
sm = [SoSecurityManager sharedSecurityManager];
|
||||||
if (activeUserIsOwner
|
if (activeUserIsOwner
|
||||||
|
@ -253,14 +237,21 @@
|
||||||
onObject: self inContext: context])
|
onObject: self inContext: context])
|
||||||
{
|
{
|
||||||
tmpCalendar = [[self calendar: NO secure: NO] mutableCopy];
|
tmpCalendar = [[self calendar: NO secure: NO] mutableCopy];
|
||||||
tmpComponent = (iCalRepeatableEntityObject *)
|
|
||||||
[tmpCalendar firstChildWithTag: [self componentTag]];
|
// We filter all components, in case we have RECURRENCE-ID
|
||||||
|
allComponents = [tmpCalendar childrenWithTag: [self componentTag]];
|
||||||
|
|
||||||
|
for (i = 0; i < [allComponents count]; i++)
|
||||||
|
{
|
||||||
|
tmpComponent = (iCalRepeatableEntityObject *)[allComponents objectAtIndex:i];
|
||||||
[self _filterComponent: tmpComponent];
|
[self _filterComponent: tmpComponent];
|
||||||
|
|
||||||
// We add an additional header here to inform clients (if necessary) that
|
// We add an additional header here to inform clients (if necessary) that
|
||||||
// we churned the content of the calendar.
|
// we churned the content of the calendar.
|
||||||
[tmpComponent addChild: [CardElement simpleElementWithTag: @"X-SOGo-Secure"
|
[tmpComponent addChild: [CardElement simpleElementWithTag: @"X-SOGo-Secure"
|
||||||
value: @"YES"]];
|
value: @"YES"]];
|
||||||
|
}
|
||||||
|
|
||||||
iCalString = [tmpCalendar versitString];
|
iCalString = [tmpCalendar versitString];
|
||||||
[tmpCalendar release];
|
[tmpCalendar release];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue