Monotone-Parent: 866444d29ef56047291b49a17e79ceacf8d03e2b

Monotone-Revision: 05c004606ea7630c74dd1bb97957bc57215c5e55

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-05-09T19:21:01
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-05-09 19:21:01 +00:00
parent b2054b48cb
commit 98b2014f6b
2 changed files with 20 additions and 15 deletions

View File

@@ -1,5 +1,9 @@
2007-05-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoAuthenticator.m ([SOGoAuthenticator
-LDAPCheckLogin:_loginpassword:_pwd]): use the user manager to
check login information.
* SoObjects/Contacts/SOGoContactLDAPFolder.m
([SOGoContactLDAPFolder
+contactFolderWithName:aNameandDisplayName:aDisplayNameinContainer:aContainer]):

View File

@@ -22,9 +22,11 @@
#import <NGLdap/NGLdapConnection.h>
#import "SOGoPermissions.h"
#include "SOGoAuthenticator.h"
#include "SOGoUser.h"
#include "common.h"
#import "LDAPUserManager.h"
#import "SOGoAuthenticator.h"
#import "SOGoUser.h"
#import "common.h"
@implementation SOGoAuthenticator
@@ -50,9 +52,9 @@ static SOGoAuthenticator *auth = nil;
authMethod = [[ud stringForKey:@"AuthentificationMethod"] retain];
if ([authMethod isEqualToString: @"LDAP"])
{
LDAPBaseDN = [[ud stringForKey:@"LDAPRootDN"] retain];
LDAPHost = [[ud stringForKey:@"LDAPHost"] retain];
LDAPPort = [ud integerForKey:@"LDAPPort"];
// LDAPBaseDN = [[ud stringForKey:@"LDAPRootDN"] retain];
// LDAPHost = [[ud stringForKey:@"LDAPHost"] retain];
// LDAPPort = [ud integerForKey:@"LDAPPort"];
}
}
@@ -87,11 +89,11 @@ static SOGoAuthenticator *auth = nil;
- (BOOL) LDAPCheckLogin: (NSString *) _login
password: (NSString *) _pwd
{
return [NGLdapConnection checkPassword: _pwd
ofLogin: _login
atBaseDN: LDAPBaseDN
onHost: LDAPHost
port: LDAPPort];
LDAPUserManager *um;
um = [LDAPUserManager sharedUserManager];
return [um checkLogin: _login andPassword: _pwd];
}
/* create SOGoUser */
@@ -105,7 +107,7 @@ static SOGoAuthenticator *auth = nil;
if (!anonymous)
anonymous
= [[SOGoUser alloc] initWithLogin:@"anonymous"
= [[SOGoUser alloc] initWithLogin: @"anonymous"
roles: [NSArray arrayWithObject: SoRole_Anonymous]];
if (!freebusy)
freebusy
@@ -124,9 +126,8 @@ static SOGoAuthenticator *auth = nil;
user = anonymous;
}
else
user = [[[SOGoUser alloc] initWithLogin: login
roles: [self rolesForLogin: login]]
autorelease];
user = [SOGoUser userWithLogin: login
roles: [self rolesForLogin: login]];
}
else
user = nil;