* SoObject/SOGo/SOGoParentFolder.m (_createPersonalFolder):

Automatically create the folder if its owner is a resource.
    (not if the active user is a resource)

Monotone-Parent: 4a872122da5acff4772feafceee7decf55c1bd98
Monotone-Revision: 6857ec31df4746fa033c80de4b53d7d7e0a4b9e4

Monotone-Author: jraby@inverse.ca
Monotone-Date: 2012-05-09T17:48:51
maint-2.0.2
Jean Raby 2012-05-09 17:48:51 +00:00
parent bb594f1921
commit 9e65b8b3e4
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2012-05-09 Jean Raby <jraby@inverse.ca>
* 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 <lmarcotte@inverse.ca>
* SoObjects/Mailer/SOGoDraftObject.m - don't encode message/rfc822

View File

@ -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]];