merge of '5ca0171c2820bdea8fa61c516f7b07890504fe94'

and 'ae600dde90a09517ff2cad4629bd94dc68652e03'

Monotone-Parent: 5ca0171c2820bdea8fa61c516f7b07890504fe94
Monotone-Parent: ae600dde90a09517ff2cad4629bd94dc68652e03
Monotone-Revision: f515f427a2758c70b0acbdb399f62573b5979407

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2009-10-23T21:20:45
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle 2009-10-23 21:20:45 +00:00
commit e54807ff39
4 changed files with 85 additions and 50 deletions

View file

@ -1,3 +1,17 @@
2009-10-23 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Contacts/SOGoContactSourceFolder.m
(-initWithName:andDisplayName:inContainer:): use the source name
when the displayname is nil.
* SoObjects/SOGo/SOGoUserManager.m (_registerSource:): added
sanity checks and warnings to the user.
2009-10-23 Ludovic Marcotte <lmarcotte@inverse.ca>
* SoObjects/SOGo/SOGoUserFolder.m (-subFoldersFromFolder:)
Addded a check to NOT return web calendars in this query.
2009-10-23 Francis Lachapelle <flachapelle@inverse.ca> 2009-10-23 Francis Lachapelle <flachapelle@inverse.ca>
* UI/MailerUI/UIxMailMainFrame.m (-formattedMailtoString:): fixed * UI/MailerUI/UIxMailMainFrame.m (-formattedMailtoString:): fixed

View file

@ -124,6 +124,8 @@
if ((self = [self initWithName: newName if ((self = [self initWithName: newName
inContainer: newContainer])) inContainer: newContainer]))
{ {
if (![newDisplayName length])
newDisplayName = newName;
ASSIGN (displayName, newDisplayName); ASSIGN (displayName, newDisplayName);
} }

View file

@ -170,7 +170,8 @@ static NSString *LDAPContactInfoAttribute = nil;
if (![securityManager validatePermission: SOGoPerm_AccessObject if (![securityManager validatePermission: SOGoPerm_AccessObject
onObject: currentFolder inContext: context] onObject: currentFolder inContext: context]
&& [[currentFolder ownerInContext: context] && [[currentFolder ownerInContext: context]
isEqualToString: folderOwner]) isEqualToString: folderOwner]
&& [NSStringFromClass([currentFolder class]) compare: @"SOGoWebAppointmentFolder"] != NSOrderedSame)
{ {
folderName = [NSString stringWithFormat: @"/%@/%@", folderName = [NSString stringWithFormat: @"/%@/%@",
[parentFolder nameInContainer], [parentFolder nameInContainer],

View file

@ -104,9 +104,12 @@ static NSLock *lock = nil;
NSString *sourceID, *value, *type; NSString *sourceID, *value, *type;
NSMutableDictionary *metadata; NSMutableDictionary *metadata;
id<SOGoSource> ldapSource; id<SOGoSource> ldapSource;
BOOL isAddressBook;
Class c; Class c;
sourceID = [udSource objectForKey: @"id"]; sourceID = [udSource objectForKey: @"id"];
if ([sourceID length] > 0)
{
type = [udSource objectForKey: @"type"]; type = [udSource objectForKey: @"type"];
if (!type || [type caseInsensitiveCompare: @"ldap"] == NSOrderedSame) if (!type || [type caseInsensitiveCompare: @"ldap"] == NSOrderedSame)
@ -126,14 +129,29 @@ static NSLock *lock = nil;
[metadata setObject: value forKey: @"canAuthenticate"]; [metadata setObject: value forKey: @"canAuthenticate"];
value = [udSource objectForKey: @"isAddressBook"]; value = [udSource objectForKey: @"isAddressBook"];
if (value) if (value)
{
[metadata setObject: value forKey: @"isAddressBook"]; [metadata setObject: value forKey: @"isAddressBook"];
isAddressBook = [value boolValue];
}
else
isAddressBook = NO;
value = [udSource objectForKey: @"displayName"]; value = [udSource objectForKey: @"displayName"];
if (value) if (value)
[metadata setObject: value forKey: @"displayName"]; [metadata setObject: value forKey: @"displayName"];
else
{
if (isAddressBook)
[self errorWithFormat: @"addressbook source '%@' has"
@" no displayname", sourceID];
}
value = [udSource objectForKey: @"MailFieldNames"]; value = [udSource objectForKey: @"MailFieldNames"];
if (value) if (value)
[metadata setObject: value forKey: @"MailFieldNames"]; [metadata setObject: value forKey: @"MailFieldNames"];
[_sourcesMetadata setObject: metadata forKey: sourceID]; [_sourcesMetadata setObject: metadata forKey: sourceID];
}
else
[self errorWithFormat: @"attempted to register a contact/user source"
@" without id (skipped)"];
} }
- (void) _prepareSourcesWithDefaults: (NSUserDefaults *) ud - (void) _prepareSourcesWithDefaults: (NSUserDefaults *) ud