From e0ec28e71bda97768c1285ba9d4837e715b99118 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 21 Mar 2007 14:27:48 +0000 Subject: [PATCH] Monotone-Parent: 06205eb1b9669a6fa1b780ee9bb1f7c53024f79c Monotone-Revision: 2914b9eab0b116cea42ae4eefee3758488d098c7 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-03-21T14:27:48 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ SoObjects/Contacts/SOGoContactGCSFolder.m | 8 ++++++++ 2 files changed, 12 insertions(+) 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