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:
commit
e54807ff39
14
ChangeLog
14
ChangeLog
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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],
|
||||||
|
|
|
@ -104,36 +104,54 @@ 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"];
|
||||||
type = [udSource objectForKey: @"type"];
|
if ([sourceID length] > 0)
|
||||||
|
{
|
||||||
|
type = [udSource objectForKey: @"type"];
|
||||||
|
|
||||||
if (!type || [type caseInsensitiveCompare: @"ldap"] == NSOrderedSame)
|
if (!type || [type caseInsensitiveCompare: @"ldap"] == NSOrderedSame)
|
||||||
c = [LDAPSource class];
|
c = [LDAPSource class];
|
||||||
else
|
else
|
||||||
c = [SQLSource class];
|
c = [SQLSource class];
|
||||||
|
|
||||||
ldapSource = [c sourceFromUDSource: udSource];
|
ldapSource = [c sourceFromUDSource: udSource];
|
||||||
if (sourceID)
|
if (sourceID)
|
||||||
[_sources setObject: ldapSource forKey: sourceID];
|
[_sources setObject: ldapSource forKey: sourceID];
|
||||||
|
else
|
||||||
|
[self errorWithFormat: @"id field missing in an user source,"
|
||||||
|
@" check the SOGoUserSources defaults"];
|
||||||
|
metadata = [NSMutableDictionary dictionary];
|
||||||
|
value = [udSource objectForKey: @"canAuthenticate"];
|
||||||
|
if (value)
|
||||||
|
[metadata setObject: value forKey: @"canAuthenticate"];
|
||||||
|
value = [udSource objectForKey: @"isAddressBook"];
|
||||||
|
if (value)
|
||||||
|
{
|
||||||
|
[metadata setObject: value forKey: @"isAddressBook"];
|
||||||
|
isAddressBook = [value boolValue];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
isAddressBook = NO;
|
||||||
|
value = [udSource objectForKey: @"displayName"];
|
||||||
|
if (value)
|
||||||
|
[metadata setObject: value forKey: @"displayName"];
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (isAddressBook)
|
||||||
|
[self errorWithFormat: @"addressbook source '%@' has"
|
||||||
|
@" no displayname", sourceID];
|
||||||
|
}
|
||||||
|
value = [udSource objectForKey: @"MailFieldNames"];
|
||||||
|
if (value)
|
||||||
|
[metadata setObject: value forKey: @"MailFieldNames"];
|
||||||
|
[_sourcesMetadata setObject: metadata forKey: sourceID];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
[self errorWithFormat: @"id field missing in an user source,"
|
[self errorWithFormat: @"attempted to register a contact/user source"
|
||||||
@" check the SOGoUserSources defaults"];
|
@" without id (skipped)"];
|
||||||
metadata = [NSMutableDictionary dictionary];
|
|
||||||
value = [udSource objectForKey: @"canAuthenticate"];
|
|
||||||
if (value)
|
|
||||||
[metadata setObject: value forKey: @"canAuthenticate"];
|
|
||||||
value = [udSource objectForKey: @"isAddressBook"];
|
|
||||||
if (value)
|
|
||||||
[metadata setObject: value forKey: @"isAddressBook"];
|
|
||||||
value = [udSource objectForKey: @"displayName"];
|
|
||||||
if (value)
|
|
||||||
[metadata setObject: value forKey: @"displayName"];
|
|
||||||
value = [udSource objectForKey: @"MailFieldNames"];
|
|
||||||
if (value)
|
|
||||||
[metadata setObject: value forKey: @"MailFieldNames"];
|
|
||||||
[_sourcesMetadata setObject: metadata forKey: sourceID];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) _prepareSourcesWithDefaults: (NSUserDefaults *) ud
|
- (void) _prepareSourcesWithDefaults: (NSUserDefaults *) ud
|
||||||
|
|
Loading…
Reference in a new issue