diff --git a/ChangeLog b/ChangeLog index 8a968aa3a..ba867bdc1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-07-20 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoUserFolder.m (_subFoldersFromFolder:): we + need to validate the current user's access to the listed folders + again because of the recent changes on SOGoParentFolder. + * UI/Contacts/UIxContactFoldersView.m (_subFoldersFromFolder:): removed unused method. diff --git a/SoObjects/SOGo/SOGoUserFolder.m b/SoObjects/SOGo/SOGoUserFolder.m index e029e2c94..072ebb7b0 100644 --- a/SoObjects/SOGo/SOGoUserFolder.m +++ b/SoObjects/SOGo/SOGoUserFolder.m @@ -27,6 +27,7 @@ #import #import +#import #import #import #import @@ -147,18 +148,27 @@ NSMutableArray *folders; NSEnumerator *subfolders; SOGoFolder *currentFolder; - NSString *folderName; + NSString *folderName, *folderOwner; Class subfolderClass; NSMutableDictionary *currentDictionary; + SoSecurityManager *securityManager; folders = [NSMutableArray array]; + folderOwner = [parentFolder ownerInContext: context]; + securityManager = [SoSecurityManager sharedSecurityManager]; + subfolderClass = [[parentFolder class] subFolderClass]; subfolders = [[parentFolder subFolders] objectEnumerator]; while ((currentFolder = [subfolders nextObject])) { - if ([currentFolder isMemberOfClass: subfolderClass]) + if (![securityManager validatePermission: SOGoPerm_AccessObject + onObject: currentFolder + inContext: context] + && [[currentFolder ownerInContext: context] + isEqualToString: folderOwner] + && [currentFolder isMemberOfClass: subfolderClass]) { folderName = [NSString stringWithFormat: @"/%@/%@", [parentFolder nameInContainer],