Monotone-Parent: 8a8f01d00132a79870b7c9ed8adbce9f4c0c79bb

Monotone-Revision: 23e776c8c54fe02739326119a5d6519e81abc605

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-07-04T20:07:52
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2007-07-04 20:07:52 +00:00
parent 1c0089d243
commit 1844d390df
2 changed files with 20 additions and 4 deletions

View File

@ -1,5 +1,9 @@
2007-07-04 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Main/SOGo.m ([SOGo -lookupUser:_keyinContext:]): check if the
user exists before creating the SOGoUserFolder instance. If not,
returns nil.
* UI/MailerUI/UIxMailSourceView.[hm]: new class module designed to
return the message source code in plain text.

View File

@ -43,6 +43,7 @@
#import <SoObjects/SOGo/SOGoAuthenticator.h>
#import <SoObjects/SOGo/SOGoUserFolder.h>
#import <SoObjects/SOGo/SOGoUser.h>
#import <SoObjects/SOGo/SOGoPermissions.h>
#import "SOGoProductLoader.h"
@ -241,9 +242,20 @@ static BOOL debugObjectAllocation = NO;
return YES;
}
- (id)lookupUser:(NSString *)_key inContext:(id)_ctx {
return [$(@"SOGoUserFolder") objectWithName:_key
inContainer: self];
- (id) lookupUser: (NSString *) _key
inContext: (id)_ctx
{
SOGoUser *user;
id userFolder;
user = [SOGoUser userWithLogin: _key roles: nil];
if (user)
userFolder = [$(@"SOGoUserFolder") objectWithName: _key
inContainer: self];
else
userFolder = nil;
return userFolder;
}
- (void) _setupLocaleInContext: (WOContext *) _ctx
@ -289,7 +301,7 @@ static BOOL debugObjectAllocation = NO;
if ([self isUserName:_key inContext:_ctx])
return [self lookupUser:_key inContext:_ctx];
return nil;
}