Monotone-Parent: 54ec8c39f5bb2075a087aabb062d28af978421de

Monotone-Revision: 36eb21ac828a920f7994e922c1c7e6fe481c62ac

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-01-16T18:57:58
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2008-01-16 18:57:58 +00:00
parent 8731c448c3
commit d36fb810d5
5 changed files with 44 additions and 6 deletions
+17 -3
View File
@@ -32,10 +32,11 @@
#import "AgenorUserDefaults.h"
#import "LDAPUserManager.h"
#import "NSArray+Utilities.h"
#import "SOGoCache.h"
#import "SOGoDateFormatter.h"
#import "SOGoObject.h"
#import "SOGoPermissions.h"
#import "NSArray+Utilities.h"
#import "SOGoUser.h"
@@ -124,10 +125,18 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
+ (SOGoUser *) userWithLogin: (NSString *) newLogin
roles: (NSArray *) newRoles
{
SOGoCache *cache;
SOGoUser *user;
user = [[self alloc] initWithLogin: newLogin roles: newRoles];
[user autorelease];
cache = [SOGoCache sharedCache];
user = [cache userNamed: newLogin];
if (!user)
{
user = [[self alloc] initWithLogin: newLogin roles: newRoles];
[user autorelease];
[cache registerUser: user];
}
[user setPrimaryRoles: newRoles];
return user;
}
@@ -181,6 +190,11 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
[super dealloc];
}
- (void) setPrimaryRoles: (NSArray *) newRoles
{
ASSIGN (roles, newRoles);
}
- (void) setCurrentPassword: (NSString *) newPassword
{
ASSIGN (currentPassword, newPassword);