Monotone-Parent: a09f8fb1181d8b0b235c539573e1f6e20a71f436

Monotone-Revision: 672551e38e8a075f699074177a66d9f7f114f873

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-06-19T18:01:40
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2007-06-19 18:01:40 +00:00
parent 7c219117cd
commit 921ecf63cb
2 changed files with 3 additions and 18 deletions

View File

@ -1,5 +1,8 @@
2007-06-19 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Mailer/SOGoMailAccounts.m ([SOGoMailAccounts
-isInternetRequest]): removed method.
* SoObjects/SOGo/AgenorUserDefaults.m ([AgenorUserDefaults
-jsonRepresentation]): new method with an explicit name.

View File

@ -28,12 +28,6 @@
static NSString *AgenorShareLoginMarker = @".-.";
/* detect webmail being accessed from the outside */
- (BOOL)isInternetRequest {
return ([context isAccessFromIntranet] ? NO : YES);
}
/* listing the available mailboxes */
- (BOOL) isInHomeFolderBranchOfLoggedInAccount: (NSString *) userLogin
@ -70,9 +64,6 @@ static NSString *AgenorShareLoginMarker = @".-.";
account = [user primaryIMAP4AccountString];
if ([account isNotNull]) account = [NSArray arrayWithObject:account];
if ([self isInternetRequest]) /* only show primary mailbox in Internet */
return account;
shares = [user valueForKey:@"additionalIMAP4AccountStrings"];
return ([shares count] == 0)
? account
@ -155,19 +146,10 @@ static NSString *AgenorShareLoginMarker = @".-.";
}
if ([self isValidMailAccountName:_key]) {
/* forbid shares for requests coming from the Internet */
BOOL isSharedKey;
isSharedKey = [_key rangeOfString:AgenorShareLoginMarker].length > 0;
if ([self isInternetRequest]) {
if (isSharedKey) {
return [NSException exceptionWithHTTPStatus:403 /* Forbidden */
reason:
@"Access to shares forbidden from the Internet"];
}
}
return isSharedKey
? [self sharedMailAccountWithName:_key inContext:_ctx]
: [self mailAccountWithName:_key inContext:_ctx];