From 921ecf63cb81e77b79786425c12869032578333c Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 19 Jun 2007 18:01:40 +0000 Subject: [PATCH] Monotone-Parent: a09f8fb1181d8b0b235c539573e1f6e20a71f436 Monotone-Revision: 672551e38e8a075f699074177a66d9f7f114f873 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-06-19T18:01:40 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 3 +++ SoObjects/Mailer/SOGoMailAccounts.m | 18 ------------------ 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index fee0038a5..4c75d915a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2007-06-19 Wolfgang Sourdeau + * SoObjects/Mailer/SOGoMailAccounts.m ([SOGoMailAccounts + -isInternetRequest]): removed method. + * SoObjects/SOGo/AgenorUserDefaults.m ([AgenorUserDefaults -jsonRepresentation]): new method with an explicit name. diff --git a/SoObjects/Mailer/SOGoMailAccounts.m b/SoObjects/Mailer/SOGoMailAccounts.m index 03ea7d01c..bb3ac3ba4 100644 --- a/SoObjects/Mailer/SOGoMailAccounts.m +++ b/SoObjects/Mailer/SOGoMailAccounts.m @@ -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];