mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-16 04:13:17 +00:00
Monotone-Parent: 2fdf0ead0781ef2362dd389811d5db44ca4cc84a
Monotone-Revision: c91eef7edcfd08d414664c25a590b6268a7e58e2 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-11-29T04:19:32 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -68,8 +68,10 @@
|
||||
@implementation SQLSource
|
||||
|
||||
+ (id) sourceFromUDSource: (NSDictionary *) udSource
|
||||
inDomain: (NSString *) domain
|
||||
{
|
||||
return [[[self alloc] initFromUDSource: udSource] autorelease];
|
||||
return [[[self alloc] initFromUDSource: udSource
|
||||
inDomain: domain] autorelease];
|
||||
}
|
||||
|
||||
- (id) init
|
||||
@@ -96,7 +98,10 @@
|
||||
}
|
||||
|
||||
- (id) initFromUDSource: (NSDictionary *) udSource
|
||||
inDomain: (NSString *) sourceDomain
|
||||
{
|
||||
NSString *udDomainAttribute;
|
||||
|
||||
self = [self init];
|
||||
|
||||
ASSIGN(_sourceID, [udSource objectForKey: @"id"]);
|
||||
@@ -108,7 +113,30 @@
|
||||
|
||||
if ([udSource objectForKey: @"viewURL"])
|
||||
_viewURL = [[NSURL alloc] initWithString: [udSource objectForKey: @"viewURL"]];
|
||||
|
||||
|
||||
#warning this domain code has no effect yet
|
||||
/* FIXME: the queries below do not setup c_domain. */
|
||||
udDomainAttribute = [udSource objectForKey: @"domainAttribute"];
|
||||
if ([sourceDomain length])
|
||||
{
|
||||
if ([udDomainAttribute length])
|
||||
{
|
||||
[self errorWithFormat: @"cannot define 'domainAttribute'"
|
||||
@" for a domain-based source (%@)", _sourceID];
|
||||
[self autorelease];
|
||||
return nil;
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSIGN (_domain, sourceDomain);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([udDomainAttribute length])
|
||||
ASSIGN (_domainAttribute, udDomainAttribute);
|
||||
}
|
||||
|
||||
if (!_viewURL)
|
||||
{
|
||||
[self autorelease];
|
||||
@@ -118,6 +146,11 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSString *) domain
|
||||
{
|
||||
return _domain;
|
||||
}
|
||||
|
||||
- (BOOL) _isPassword: (NSString *) plainPassword
|
||||
equalTo: (NSString *) encryptedPassword
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user