diff --git a/ChangeLog b/ChangeLog index f297e4cf7..71173d93b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-03-21 Wolfgang Sourdeau + * SoObjects/Contacts/SOGoContactGCSFolder.m ([SOGoContactGCSFolder + -delete]): override method to refuse the deletion of the folder if + its nameInContainer is "personal". + * SoObjects/SOGo/SOGoFolder.m ([SOGoFolder -delete]): new method that forwards the deletion request to the folder manager. diff --git a/SoObjects/Contacts/SOGoContactGCSFolder.m b/SoObjects/Contacts/SOGoContactGCSFolder.m index 828be57a4..29dbac21b 100644 --- a/SoObjects/Contacts/SOGoContactGCSFolder.m +++ b/SoObjects/Contacts/SOGoContactGCSFolder.m @@ -179,6 +179,14 @@ return @"vcard-collection"; } +- (NSException *) delete +{ + return (([nameInContainer isEqualToString: @"personal"]) + ? [NSException exceptionWithHTTPStatus: 403 + reason: @"the 'personal' folder cannot be deleted"] + : [super delete]); +} + // /* GET */ // - (id) GETAction: (id)_ctx