From 96dec58f8e7a7be54816bdfc94554c02f866d187 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 4 Jul 2007 20:13:49 +0000 Subject: [PATCH] Monotone-Parent: 301f32f12ce075dd8fc334d216d4ffd2f04fc0df Monotone-Revision: 25a776bd6b15aa10f240bacd8adc2804905b3aa3 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-07-04T20:13:49 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ SoObjects/SOGo/SOGoFolder.m | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index ea05b9b29..8f6cabf13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-07-04 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoFolder.m ([SOGoFolder -ocsFolder]): create + the folder only if the current user is the owner of the future + folder. + * SoObjects/Appointments/SOGoCalendarComponent.m ([SOGoCalendarComponent -contentAsString]): we return the content based on the permissions returned by the security manager instead diff --git a/SoObjects/SOGo/SOGoFolder.m b/SoObjects/SOGo/SOGoFolder.m index 5eb8adb81..d3f73984a 100644 --- a/SoObjects/SOGo/SOGoFolder.m +++ b/SoObjects/SOGo/SOGoFolder.m @@ -28,6 +28,7 @@ #import #import +#import #import #import #import @@ -38,6 +39,7 @@ #import #import "SOGoPermissions.h" +#import "SOGoUser.h" #import "SOGoFolder.h" @@ -151,11 +153,14 @@ static NSString *defaultUserID = @""; - (GCSFolder *) ocsFolder { GCSFolder *folder; + NSString *userLogin; if (!ocsFolder) { ocsFolder = [self ocsFolderForPath: [self ocsPath]]; + userLogin = [[context activeUser] login]; if (!ocsFolder + && [userLogin isEqualToString: [self ownerInContext: context]] && [self folderIsMandatory] && [self create]) ocsFolder = [self ocsFolderForPath: [self ocsPath]];