diff --git a/ChangeLog b/ChangeLog index 8626d7f85..0b846458b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,15 @@ UI/WebServerResources/SchedulerUI.js Fixed the escaping of characters and associated search methods. + * SoObjects/SOGo/SOGoGCSFolder.m + ([SOGoGCSFolder aclsForUser:forObjectAtPath:]): + Added two new defaults to control the default + ACLs when none are specified: + SOGoCalendarDefaultRoles and SOGoContactsDefaultRoles + They are both arrays in which we set strings, + for example : + SOGoCalendarDefaultRoles = ("ObjectCreator", "PublicViewer"); + SOGoContactsDefaultRoles = ("ObjectEditor"); 2008-12-30 Francis Lachapelle diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index 21d0176d7..fc25a53fa 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -819,6 +819,17 @@ static NSArray *childRecordFields = nil; acls = [self aclsForUser: defaultUserID forObjectAtPath: objectPathArray]; + // If we still don't have ACLs defined for this particular resource, + // let's go get the system-wide defaults, if any. + if (![acls count]) + { + if ([[container nameInContainer] isEqualToString: @"Calendar"] || + [[container nameInContainer] isEqualToString: @"Contacts"]) + acls = [[NSUserDefaults standardUserDefaults] + objectForKey: [NSString stringWithFormat: @"SOGo%@DefaultRoles", + [container nameInContainer]]]; + } + return acls; }