diff --git a/ChangeLog b/ChangeLog index ad734a859..87b2d996b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-03-25 Wolfgang Sourdeau + + * UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor + -takeValuesFromRequest:_rqinContext:_ctx]): treat the regular + monthly recurrences as all others. + + * SoObjects/SOGo/SOGoGCSFolder.m ([SOGoGCSFolder + -davSetProperties:setPropsremovePropertiesNamed:removedPropsinContext:localContext]): + returns an exception if the property to modify is not + "davDisplayName" and if the current user has not the owner role + over the current collection. + 2008-03-25 Francis Lachapelle * UI/Scheduler/UIxCalMainView.m ([UIxCalMainView diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index 38a0c90d9..d7f6c6b71 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -528,12 +528,26 @@ static BOOL sendFolderAdvisories = NO; inContext: (WOContext *) localContext { NSString *newDisplayName; + NSException *exception; + NSArray *currentRoles; - newDisplayName = [setProps objectForKey: @"davDisplayName"]; - if ([newDisplayName length]) - [self renameTo: newDisplayName]; + currentRoles = [[localContext activeUser] rolesForObject: self + inContext: localContext]; + if ([currentRoles containsObject: SoRole_Owner]) + { + newDisplayName = [setProps objectForKey: @"davDisplayName"]; + if ([newDisplayName length]) + { + [self renameTo: newDisplayName]; + exception = nil; + } + else + exception = [NSException exceptionWithHTTPStatus: 404]; + } + else + exception = [NSException exceptionWithHTTPStatus: 403]; - return nil; + return exception; } /* acls as a container */ diff --git a/SoObjects/SOGo/SOGoObject.m b/SoObjects/SOGo/SOGoObject.m index a4e0c227d..64f1293fc 100644 --- a/SoObjects/SOGo/SOGoObject.m +++ b/SoObjects/SOGo/SOGoObject.m @@ -20,8 +20,8 @@ */ #if LIB_FOUNDATION_LIBRARY -#error SOGo will not work properly with libFoundation. \ - Please use gnustep-base instead. +#error SOGo will not work properly with libFoundation. +#error Please use gnustep-base instead. #endif #import diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index 1521b06d9..91d40d0fb 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -1428,7 +1428,7 @@ RANGE(2); // We recur on specific days... if ([[self repeat2] intValue] == 1) { - [theRule setNamedValue: @"bymonthday" to: [self repeat5]]; + [theRule setNamedValue: @"bymonthday" to: [self repeat5]]; } else { @@ -1526,16 +1526,12 @@ RANGE(2); |iCalWeekDayFriday)]; [rule setFrequency: iCalRecurrenceFrequenceDaily]; } - else if ([repeat caseInsensitiveCompare: @"MONTHLY"] == NSOrderedSame) - { - [rule setNamedValue: @"bymonthday" - to: [NSString stringWithFormat: @"%d", [[component startDate] dayOfMonth]]]; - [rule setFrequency: iCalRecurrenceFrequenceMonthly]; - } - else if ([repeat caseInsensitiveCompare: @"DAILY"] == NSOrderedSame || - [repeat caseInsensitiveCompare: @"WEEKLY"] == NSOrderedSame || - [repeat caseInsensitiveCompare: @"YEARLY"] == NSOrderedSame) + else if ([repeat caseInsensitiveCompare: @"MONTHLY"] == NSOrderedSame + || [repeat caseInsensitiveCompare: @"DAILY"] == NSOrderedSame + || [repeat caseInsensitiveCompare: @"WEEKLY"] == NSOrderedSame + || [repeat caseInsensitiveCompare: @"YEARLY"] == NSOrderedSame) { + [rule setInterval: @"1"]; [rule setFrequency: (iCalRecurrenceFrequency) [rule valueForFrequency: repeat]]; }