mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-29 23:25:27 +00:00
Monotone-Parent: 47aef98a4894f30e9031a2a06ca088c4ac71d7f3
Monotone-Revision: 9a0e8d7545284ad8801b490d2c5baf6898323af9 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-01-26T22:25:23 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2007-01-26 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/SOGoAuthenticator.m ([SOGoAuthenticator
|
||||
-userInContext:]): if the lookup is on "freebusy.ifb" and the
|
||||
username is "anonymous" the user is automatically set to
|
||||
"freebusy".
|
||||
|
||||
2007-01-12 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/SOGoAuthenticator.m ([SOGoAuthenticator
|
||||
|
||||
@@ -7,7 +7,7 @@ include ./Version
|
||||
LIBRARY_NAME = libOGoContentStore
|
||||
TOOL_NAME = test_quick_extract
|
||||
|
||||
TYPEMODELS_DIR = $(GNUSTEP_USER_ROOT)/Library/OCSTypeModels/
|
||||
TYPEMODELS_DIR = $(GNUSTEP_SYSTEM_ROOT)/Library/OCSTypeModels/
|
||||
|
||||
libOGoContentStore_HEADER_FILES_DIR = .
|
||||
libOGoContentStore_HEADER_FILES_INSTALL_DIR = /OGoContentStore
|
||||
|
||||
@@ -94,32 +94,39 @@ static SOGoAuthenticator *auth = nil;
|
||||
- (SoUser *) userInContext:(WOContext *)_ctx
|
||||
{
|
||||
static SoUser *anonymous = nil, *freebusy;
|
||||
NSString *login;
|
||||
|
||||
SoUser *user;
|
||||
NSArray *traversalPath;
|
||||
NSString *login;
|
||||
|
||||
if (!anonymous)
|
||||
anonymous
|
||||
= [[SOGoUser alloc] initWithLogin:@"anonymous"
|
||||
roles: [NSArray arrayWithObject: SoRole_Anonymous]];
|
||||
|
||||
if (!freebusy)
|
||||
freebusy
|
||||
= [[SOGoUser alloc] initWithLogin: @"freebusy"
|
||||
roles: [NSArray arrayWithObject: SOGoRole_FreeBusy]];
|
||||
|
||||
if ((login = [self checkCredentialsInContext:_ctx]) == nil)
|
||||
/* some error (otherwise result would have been anonymous */
|
||||
return nil;
|
||||
|
||||
if ([login isEqualToString: @"anonymous"])
|
||||
return anonymous;
|
||||
else if ([login isEqualToString: @"freebusy"])
|
||||
return freebusy;
|
||||
login = [self checkCredentialsInContext:_ctx];
|
||||
if (login)
|
||||
{
|
||||
if ([login isEqualToString: @"anonymous"])
|
||||
{
|
||||
traversalPath = [_ctx objectForKey: @"SoRequestTraversalPath"];
|
||||
if ([[traversalPath lastObject] isEqualToString: @"freebusy.ifb"])
|
||||
user = freebusy;
|
||||
else
|
||||
user = anonymous;
|
||||
}
|
||||
else
|
||||
user = [[[SOGoUser alloc] initWithLogin: login
|
||||
roles: [self rolesForLogin: login]]
|
||||
autorelease];
|
||||
}
|
||||
else
|
||||
user = nil;
|
||||
|
||||
// uroles = [NSMutableArray arrayWithArray: ];
|
||||
|
||||
return [[[SOGoUser alloc] initWithLogin: login
|
||||
roles: [self rolesForLogin: login]]
|
||||
autorelease];
|
||||
return user;
|
||||
}
|
||||
|
||||
// - (BOOL) renderException: (NSException *) exception
|
||||
|
||||
Reference in New Issue
Block a user