diff --git a/ChangeLog b/ChangeLog index b8a92d3ef..074ca3d74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -58,6 +58,8 @@ parent method to remove the calendar for the user's settings. * SoObjects/Appointments/SOGoWebAppointmentFolder.m: Added some error management, for when the url is invalid / not ical / etc. + * SoObjects/SOGo/SOGoGCSFolder.m (_fetchAclsForUser: forObjectAtPath:): + Ignore group acls if we found acls for the user. 2009-09-10 Wolfgang Sourdeau diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index b89ded31d..ea276d269 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -1192,6 +1192,7 @@ static NSArray *childRecordFields = nil; NSArray *records; NSMutableArray *acls; NSString *qs; + BOOL foundUserAcls; // We look for the exact uid or any uid that begins with "@" (corresponding to groups) qs = [NSString stringWithFormat: @"(c_object = '/%@') AND (c_uid = '%@' OR c_uid LIKE '@%%')", @@ -1207,13 +1208,21 @@ static NSArray *childRecordFields = nil; SOGoGroup *group; SOGoUser *user; + foundUserAcls = NO; + for (i = 0; i < [records count]; i ++) { record = [records objectAtIndex: i]; currentUid = [record valueForKey: @"c_uid"]; if ([currentUid isEqualToString: uid]) - [acls addObject: [record valueForKey: @"c_role"]]; - else + { + [acls addObject: [record valueForKey: @"c_role"]]; + foundUserAcls = YES; + } + } + if (!foundUserAcls) + { + for (i = 0; i < [records count]; i ++) { group = [SOGoGroup groupWithIdentifier: currentUid]; if (group) diff --git a/UI/WebServerResources/UIxContactsUserFolders.js b/UI/WebServerResources/UIxContactsUserFolders.js index 5cae2c47c..4f3dd8972 100644 --- a/UI/WebServerResources/UIxContactsUserFolders.js +++ b/UI/WebServerResources/UIxContactsUserFolders.js @@ -11,7 +11,7 @@ function onSearchFormSubmit() { } else { var url = (UserFolderURL - + "usersSearch?search=" + encodedValue); + + "usersSearch?search=" + encodedValue + "&excludeGroups=1"); if (document.userFoldersRequest) { document.userFoldersRequest.aborted = true; document.userFoldersRequest.abort();