diff --git a/ChangeLog b/ChangeLog index 3b45e797c..cf5e3dbdb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-05-09 Jean Raby + + * SoObject/SOGo/SOGoParentFolder.m (_createPersonalFolder): + Automatically create the folder if its owner is a resource. + (not if the active user is a resource) + 2012-05-09 Ludovic Marcotte * SoObjects/Mailer/SOGoDraftObject.m - don't encode message/rfc822 diff --git a/SoObjects/SOGo/SOGoParentFolder.m b/SoObjects/SOGo/SOGoParentFolder.m index b3cbaa29c..8da1f1412 100644 --- a/SoObjects/SOGo/SOGoParentFolder.m +++ b/SoObjects/SOGo/SOGoParentFolder.m @@ -157,14 +157,16 @@ static SoSecurityManager *sm = nil; { NSArray *roles; SOGoGCSFolder *folder; + SOGoUser *folderOwner; roles = [[context activeUser] rolesForObject: self inContext: context]; + folderOwner = [SOGoUser userWithLogin: [self ownerInContext: context]]; // We autocreate the calendars if the user is the owner, a superuser or // if it's a resource as we won't necessarily want to login as a resource // in order to create its database tables. if ([roles containsObject: SoRole_Owner] || - [[context activeUser] isResource]) + (folderOwner && [folderOwner isResource])) { folder = [subFolderClass objectWithName: @"personal" inContainer: self]; [folder setDisplayName: [self defaultFolderName]];