From 58f00cd5306c1347451f2f3576f43ca62aa68c55 Mon Sep 17 00:00:00 2001 From: helge Date: Mon, 1 Aug 2005 12:41:11 +0000 Subject: [PATCH] moved MainUI bundle to own dir in UI/ git-svn-id: http://svn.opengroupware.org/SOGo/trunk@929 d1b88da0-ebda-0310-925b-ed51d893ca5b --- Main/ChangeLog | 8 + Main/English.lproj/Locale | 35 ---- Main/English.lproj/Localizable.strings | 12 -- Main/French.lproj/Locale | 35 ---- Main/French.lproj/Localizable.strings | 12 -- Main/GNUmakefile | 36 +--- Main/GNUmakefile.preamble | 12 -- Main/SOGo.m | 4 +- Main/SOGoGroupPage.m | 31 ---- Main/SOGoGroupPage.wox | 27 --- Main/SOGoGroupsPage.m | 35 ---- Main/SOGoGroupsPage.wox | 18 -- Main/SOGoRootPage.m | 154 ---------------- Main/SOGoRootPage.wox | 24 --- Main/SOGoUserHomePage.m | 233 ------------------------- Main/SOGoUserHomePage.wox | 120 ------------- Main/TODO | 1 - Main/Version | 2 +- Main/common.h | 1 - Main/homepage.js | 49 ------ Main/product.plist | 106 ----------- UI/GNUmakefile | 1 + UI/MainUI/README | 70 +------- 23 files changed, 17 insertions(+), 1009 deletions(-) delete mode 100644 Main/English.lproj/Locale delete mode 100644 Main/English.lproj/Localizable.strings delete mode 100644 Main/French.lproj/Locale delete mode 100644 Main/French.lproj/Localizable.strings delete mode 100644 Main/SOGoGroupPage.m delete mode 100644 Main/SOGoGroupPage.wox delete mode 100644 Main/SOGoGroupsPage.m delete mode 100644 Main/SOGoGroupsPage.wox delete mode 100644 Main/SOGoRootPage.m delete mode 100644 Main/SOGoRootPage.wox delete mode 100644 Main/SOGoUserHomePage.m delete mode 100644 Main/SOGoUserHomePage.wox delete mode 100644 Main/TODO delete mode 100644 Main/homepage.js delete mode 100644 Main/product.plist diff --git a/Main/ChangeLog b/Main/ChangeLog index 10f55760..1f7fa7b6 100644 --- a/Main/ChangeLog +++ b/Main/ChangeLog @@ -1,3 +1,11 @@ +2005-08-01 Helge Hess + + * v0.9.39 + + * moved MainUI product bundle to UI/MainUI + + * SOGo.m: fixed some gcc 4.0 warnings + 2005-07-21 Helge Hess * product.plist: protect homepage using SOPE access control (v0.9.38) diff --git a/Main/English.lproj/Locale b/Main/English.lproj/Locale deleted file mode 100644 index ac087fc2..00000000 --- a/Main/English.lproj/Locale +++ /dev/null @@ -1,35 +0,0 @@ -/* English */ -{ - NSLanguageName = "English"; - NSFormalName = "English"; - NSLocaleCode = "en"; /* ISO 639-1 */ - NSLanguageCode = "eng"; /* ISO 639-2 */ - NSParentContext = ""; - - NSAMPMDesignation = (AM, PM); - NSCurrencySymbol = "$"; - NSDateFormatString = "%A, %B %e, %Y"; - NSDateTimeOrdering = MDYH; - NSDecimalDigits = ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9"); - NSDecimalSeparator = "."; - NSEarlierTimeDesignations = (prior, last, past, ago); - NSHourNameDesignations = ((0, midnight), (10, morning), (12, noon, lunch), (14, afternoon), (19, dinner)); - NSInternationalCurrencyString = USD; /* ISO 4217 */ - NSLaterTimeDesignations = (next); - NSMonthNameArray = (January, February, March, April, May, June, July, August, September, October, November, December); - NSNextDayDesignations = (tomorrow); - NSNextNextDayDesignations = (nextday); - NSPriorDayDesignations = (yesterday); - NSShortDateFormatString = "%1m/%e/%y"; - NSShortMonthNameArray = (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec); - NSShortTimeDateFormatString = "%1m/%e/%y %1I:%M %p"; - NSShortWeekDayNameArray = (Sun, Mon, Tue, Wed, Thu, Fri, Sat); - NSThisDayDesignations = (today, now); - NSThousandsSeparator = ","; - NSTimeDateFormatString = "%A, %B %e, %Y %1I:%M:%S %p %Z"; - NSTimeFormatString = "%1I:%M:%S %p"; - NSWeekDayNameArray = (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday); - NSYearMonthWeekDesignations = (year, month, week); - NSPositiveCurrencyFormatString = "$9,999.00"; - NSNegativeCurrencyFormatString = "-$9,999.00"; -} diff --git a/Main/English.lproj/Localizable.strings b/Main/English.lproj/Localizable.strings deleted file mode 100644 index ae3e21df..00000000 --- a/Main/English.lproj/Localizable.strings +++ /dev/null @@ -1,12 +0,0 @@ -/* this file is in UTF-8 format! */ - -"Homepage" = "Homepage"; - -"Internet access unauthorized and" = "Internet access unauthorized and"; -"Internet access authorized and" = "Internet access authorized and"; -"internetAccessState_0" = "CLOSED"; -"internetAccessState_1" = "OPEN"; - -"Automatic vacation messages activation" = "Automatic vacation messages activation"; -"Internet" = "Internet"; -"Intranet" = "Intranet"; diff --git a/Main/French.lproj/Locale b/Main/French.lproj/Locale deleted file mode 100644 index 70b8a2f6..00000000 --- a/Main/French.lproj/Locale +++ /dev/null @@ -1,35 +0,0 @@ -/* French */ -{ - NSLanguageName = "French"; - NSFormalName = "Français"; - NSLocaleCode = "fr"; /* ISO 639-1 */ - NSLanguageCode = "fra"; /* ISO 639-2 */ - NSParentContext = ""; - - NSCurrencySymbol = " €"; - NSDateFormatString = "%A %e %B %Y"; - NSDateTimeOrdering = DMYH; - NSDecimalDigits = ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9"); - NSDecimalSeparator = ","; - NSEarlierTimeDesignations = (dernier, "dernière", derniers, "dernières"); - NSHourNameDesignations = ((0, minuit), (12, midi), (10, matin), (14, "après-midi"), (19, soir)); - NSInternationalCurrencyString = EUR; /* ISO 4217 */ - NSLaterTimeDesignations = (prochain, prochaine, prochains, prochaines); - NSMonthNameArray = (Janvier, "Février", Mars, Avril, Mai, Juin, Juillet, "Août", Septembre, Octobre, Novembre, "Décembre"); - NSNextDayDesignations = (demain); - NSNextNextDayDesignations = ("après-demain"); - NSPriorDayDesignations = (hier); - NSShortDateFormatString = "%e/%m/%y"; - NSShortMonthNameArray = (Jan, "Fév", Mar, Avr, Mai, Jun, Jul, "Aoû", Sep, Oct, Nov, "Déc"); - NSShortTimeDateFormatString = "%e/%m/%y %1H:%M"; - NSShortWeekDayNameArray = (Dim, Lun, Mar, Mer, Jeu, Ven, Sam); - NSThisDayDesignations = ("aujourd'hui"); - NSThousandsSeparator = " "; /* space */ - NSTimeDateFormatString = "%A %e %B %Y %1H:%M:%S %Z"; - NSTimeFormatString = "%1H:%M:%S"; /* no space before and after colons*/ - NSWeekDayNameArray = (Dimanche, Lundi, Mardi, Mercredi, Jeudi, Vendredi, Samedi); - NSYearMonthWeekDesignations = ("année", mois, semaine); - NSAMPMDesignation = (AM, PM); - NSPositiveCurrencyFormatString = "9,999.00$"; - NSNegativeCurrencyFormatString = "-9,999.00$"; -} diff --git a/Main/French.lproj/Localizable.strings b/Main/French.lproj/Localizable.strings deleted file mode 100644 index 880d737e..00000000 --- a/Main/French.lproj/Localizable.strings +++ /dev/null @@ -1,12 +0,0 @@ -/* this file is in UTF-8 format! */ - -"Homepage" = "Accueil"; - -"Internet access authorized and" = "L'accès depuis internet est autorisé et "; -"Internet access unauthorized and" = "L'accès depuis internet est interdit et "; -"internetAccessState_0" = "FERMÉ" -"internetAccessState_1" = "OUVERT"; - -"Automatic vacation messages activation" = "Activation du message de réponse automatique "; -"Internet" = "Internet"; -"Intranet" = "Intranet"; diff --git a/Main/GNUmakefile b/Main/GNUmakefile index 8cbc220c..9cd90c71 100644 --- a/Main/GNUmakefile +++ b/Main/GNUmakefile @@ -5,11 +5,8 @@ include $(GNUSTEP_MAKEFILES)/common.make include ../Version include ./Version -SOGOD = sogod-$(MAJOR_VERSION).$(MINOR_VERSION) -TOOL_NAME = $(SOGOD) -BUNDLE_NAME = MainUI -BUNDLE_EXTENSION = .SOGo -BUNDLE_INSTALL_DIR = $(GNUSTEP_USER_ROOT)/Library/SOGo-$(MAJOR_VERSION).$(MINOR_VERSION) +SOGOD = sogod-$(MAJOR_VERSION).$(MINOR_VERSION) +TOOL_NAME = $(SOGOD) # daemon tool @@ -18,35 +15,6 @@ $(SOGOD)_OBJC_FILES += \ SOGo.m \ SOGoProductLoader.m \ -# product - -MainUI_PRINCIPAL_CLASS = MainUIProduct - -MainUI_LANGUAGES = English French - -MainUI_OBJC_FILES += \ - MainUIProduct.m \ - SOGoRootPage.m \ - SOGoUserHomePage.m \ - SOGoGroupPage.m \ - SOGoGroupsPage.m \ - -MainUI_RESOURCE_FILES += \ - Version \ - product.plist \ - \ - SOGoRootPage.wox \ - SOGoUserHomePage.wox \ - SOGoGroupPage.wox \ - SOGoGroupsPage.wox \ - \ - homepage.js \ - -MainUI_LOCALIZED_RESOURCE_FILES += \ - Locale Localizable.strings - -include GNUmakefile.preamble -include $(GNUSTEP_MAKEFILES)/bundle.make include $(GNUSTEP_MAKEFILES)/tool.make -include GNUmakefile.postamble -include ../fhsbundle.make diff --git a/Main/GNUmakefile.preamble b/Main/GNUmakefile.preamble index dc434140..1132d88b 100644 --- a/Main/GNUmakefile.preamble +++ b/Main/GNUmakefile.preamble @@ -15,18 +15,6 @@ ADDITIONAL_LIB_DIRS += \ SYSTEM_LIB_DIR += -L/usr/local/lib -L/usr/lib -MainUI_BUNDLE_LIBS += \ - -lSOGo \ - -lOGoContentStore \ - -lGDLContentStore \ - -lGDLAccess \ - -lNGiCal \ - -lNGObjWeb \ - -lNGMime -lNGLdap \ - -lNGStreams -lNGExtensions -lEOControl \ - -lDOM -lXmlRpc -lSaxObjC - - $(SOGOD)_TOOL_LIBS += \ -lSOGo \ -lOGoContentStore \ diff --git a/Main/SOGo.m b/Main/SOGo.m index d68e81ad..3d78f6ab 100644 --- a/Main/SOGo.m +++ b/Main/SOGo.m @@ -84,7 +84,7 @@ static BOOL doCrashOnSessionCreate = NO; /* authenticator */ -- (id)authenticatorInContext:(WOContext *)_ctx { +- (id)authenticatorInContext:(id)_ctx { return [SOGoAuthenticator sharedSOGoAuthenticator]; } @@ -201,7 +201,7 @@ static BOOL doCrashOnSessionCreate = NO; /* session management */ -- (WOSession *)createSessionForRequest:(WORequest *)_request { +- (id)createSessionForRequest:(WORequest *)_request { [self warnWithFormat:@"session creation requested!"]; if (doCrashOnSessionCreate) abort(); diff --git a/Main/SOGoGroupPage.m b/Main/SOGoGroupPage.m deleted file mode 100644 index f157417e..00000000 --- a/Main/SOGoGroupPage.m +++ /dev/null @@ -1,31 +0,0 @@ -/* - Copyright (C) 2004-2005 SKYRIX Software AG - - This file is part of OpenGroupware.org. - - OGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - OGo is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ - -#include - -@interface SOGoGroupPage : SoComponent -@end - -#include "common.h" - -@implementation SOGoGroupPage - -@end /* SOGoGroupPage */ diff --git a/Main/SOGoGroupPage.wox b/Main/SOGoGroupPage.wox deleted file mode 100644 index 3a8d7365..00000000 --- a/Main/SOGoGroupPage.wox +++ /dev/null @@ -1,27 +0,0 @@ - - -

- OpenGroupware.org: - -

- -

Actions

- - -

Group Members

-
    - -
  • -
    -
- -
diff --git a/Main/SOGoGroupsPage.m b/Main/SOGoGroupsPage.m deleted file mode 100644 index fe6e10eb..00000000 --- a/Main/SOGoGroupsPage.m +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (C) 2004 SKYRIX Software AG - - This file is part of OpenGroupware.org. - - OGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - OGo is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ -// $Id: SOGoGroupsPage.m 106 2004-06-30 09:44:35Z helge $ - -#include - -@interface SOGoGroupsPage : SoComponent -{ -} - -@end - -#include "common.h" - -@implementation SOGoGroupsPage - -@end /* SOGoGroupsPage */ diff --git a/Main/SOGoGroupsPage.wox b/Main/SOGoGroupsPage.wox deleted file mode 100644 index 5b102100..00000000 --- a/Main/SOGoGroupsPage.wox +++ /dev/null @@ -1,18 +0,0 @@ - - -

- OpenGroupware.org: - -

- -

- This is an (intentionally) empty page, go back. -

-
diff --git a/Main/SOGoRootPage.m b/Main/SOGoRootPage.m deleted file mode 100644 index 788662f3..00000000 --- a/Main/SOGoRootPage.m +++ /dev/null @@ -1,154 +0,0 @@ -/* - Copyright (C) 2004-2005 SKYRIX Software AG - - This file is part of OpenGroupware.org. - - OGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - OGo is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ - -#include - -@interface SOGoRootPage : SoComponent -{ - NSString *userName; -} - -@end - -#include -#include "common.h" - -@implementation SOGoRootPage - -static BOOL doNotRedirect = NO; - -+ (void)initialize { - NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; - - if ((doNotRedirect = [ud boolForKey:@"SOGoDoNotRedirectRootPage"])) - NSLog(@"SOGoRootPage: home-page redirect is disabled."); -} - -- (void)dealloc { - [self->userName release]; - [super dealloc]; -} - -/* accessors */ - -- (void)setUserName:(NSString *)_value { - ASSIGNCOPY(self->userName, _value); -} -- (NSString *)userName { - return self->userName; -} - -/* actions */ - -- (id)connectAction { - NSString *url; - - [self takeFormValuesForKeys:@"userName", nil]; - - if ([[self userName] length] == 0) - return nil; - - url = [@"/" stringByAppendingString:[[self userName] stringByEscapingURL]]; - if (![url hasSuffix:@"/"]) - url = [url stringByAppendingString:@"/"]; - - url = [[self context] urlWithRequestHandlerKey:@"so" - path:url queryString:nil]; - return [self redirectToLocation:url]; -} - -- (id)defaultAction { - WOResponse *r; - NSString *login, *rhk; - id auth, user; - id home, base; - - if (doNotRedirect) - return self; - - /* - Note: ctx.activeUser is NOT set here. Don't know why, so we retrieve - the user from the authenticator. - */ - - auth = [[self clientObject] authenticatorInContext:[self context]]; - user = [auth userInContext:[self context]]; - login = [user login]; - - if ([login isEqualToString:@"anonymous"]) { - /* use root page for unauthenticated users */ - return self; - } - - /* check base */ - - base = [self application]; - rhk = [[[self context] request] requestHandlerKey]; - if (([rhk length] == 0) || ([base requestHandlerForKey:rhk] == nil)) { - base = [base lookupName:@"so" inContext:[self context] acquire:NO]; - - if (![base isNotNull] || [base isKindOfClass:[NSException class]]) { - /* use root page if home could not be found */ - [self errorWithFormat:@"Did not find 'so' request handler!"]; - return self; - } - } - - /* lookup home-page */ - - home = [base lookupName:login inContext:[self context] acquire:NO]; - if (![home isNotNull] || [home isKindOfClass:[NSException class]]) { - /* use root page if home could not be found */ - return self; - } - - /* redirect to home-page */ - - r = [[self context] response]; - [r setStatus:302 /* moved */]; - [r setHeader:[home baseURLInContext:[self context]] forKey:@"location"]; - return r; -} - -/* response generation */ - -- (void)appendToResponse:(WOResponse *)_response inContext:(WOContext *)_ctx { - NSString *rhk; - - // TODO: we might also want to look into the HTTP basic-auth to redirect to - // the login URL! - - rhk = [[_ctx request] requestHandlerKey]; - if ([rhk length]==0 || [[self application] requestHandlerForKey:rhk]==nil) { - /* a small hack to redirect to a valid URL */ - NSString *url; - - url = [_ctx urlWithRequestHandlerKey:@"so" path:@"/" queryString:nil]; - [_response setStatus:302 /* moved */]; - [_response setHeader:url forKey:@"location"]; - [self logWithFormat:@"URL: %@", url]; - return; - } - - [super appendToResponse:_response inContext:_ctx]; -} - -@end /* SOGoRootPage */ diff --git a/Main/SOGoRootPage.wox b/Main/SOGoRootPage.wox deleted file mode 100644 index 5cf9a093..00000000 --- a/Main/SOGoRootPage.wox +++ /dev/null @@ -1,24 +0,0 @@ - - - - Scalable OGo Homepage - - - -

Scalable OGo Homepage

- -
- Login: - - -
- - - diff --git a/Main/SOGoUserHomePage.m b/Main/SOGoUserHomePage.m deleted file mode 100644 index 564fe0d2..00000000 --- a/Main/SOGoUserHomePage.m +++ /dev/null @@ -1,233 +0,0 @@ -/* - Copyright (C) 2004-2005 SKYRIX Software AG - - This file is part of OpenGroupware.org. - - OGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - OGo is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. -*/ - -#include - -@interface SOGoUserHomePage : SoComponent -{ - id item; -} - -- (NSString *)ownPath; -- (NSString *)userFolderPath; -- (NSString *)relativePathToUserFolderSubPath:(NSString *)_sub; - -- (NSString *)relativeCalendarPath; -- (NSString *)relativeContactsPath; -- (NSString *)relativeMailPath; - -@end - -#include -#include -#include -#include "common.h" - -@implementation SOGoUserHomePage - -static NSArray *internetAccessStates = nil; - -+ (void)initialize { - static BOOL didInit = NO; - - if (didInit) return; - didInit = YES; - - internetAccessStates = [[NSArray alloc] initWithObjects:@"0", @"1", nil]; -} - -- (void)dealloc { - [self->item release]; - [super dealloc]; -} - -/* lookup */ - -- (id)lookupName:(NSString *)_key inContext:(id)_ctx acquire:(BOOL)_flag { - // Note: we do no acquisition - id obj; - - /* first check attributes directly bound to the object */ - if ((obj = [super lookupName:_key inContext:_ctx acquire:NO])) - return obj; - - return nil; -} - -/* accessors */ - -- (void)setItem:(id)_item { - ASSIGN(self->item, _item); -} -- (id)item { - return self->item; -} - -- (NSArray *)internetAccessStates { - return internetAccessStates; -} - -- (NSString *)internetAccessState { - NSUserDefaults *ud; - NSNumber *value; - - ud = [[[self context] activeUser] userDefaults]; - value = [ud objectForKey:@"allowinternet"]; - return [NSString stringWithFormat:@"%d", [value boolValue]]; -} -- (void)setInternetAccessState:(NSString *)_internetAccessState { - NSUserDefaults *ud; - - ud = [[[self context] activeUser] userDefaults]; - [ud setObject:_internetAccessState forKey:@"allowinternet"]; - [ud synchronize]; -} - -- (NSString *)itemInternetAccessStateText { - NSString *key; - - key = [NSString stringWithFormat:@"internetAccessState_%@", self->item]; - return key; -} - -/* paths */ - -- (NSString *)ownPath { - NSString *uri; - NSRange r; - - uri = [[[self context] request] uri]; - - /* first: cut off query parameters */ - - r = [uri rangeOfString:@"?" options:NSBackwardsSearch]; - if (r.length > 0) - uri = [uri substringToIndex:r.location]; - return uri; -} - -- (NSString *)userFolderPath { - WOContext *ctx; - NSArray *traversalObjects; - NSString *url; - - ctx = [self context]; - traversalObjects = [ctx objectTraversalStack]; - url = [[traversalObjects objectAtIndex:1] - baseURLInContext:ctx]; - return [[NSURL URLWithString:url] path]; -} - -- (NSString *)relativePathToUserFolderSubPath:(NSString *)_sub { - NSString *dst, *rel; - - dst = [[self userFolderPath] stringByAppendingPathComponent:_sub]; - rel = [dst urlPathRelativeToPath:[self ownPath]]; - return rel; -} - -- (NSString *)relativeCalendarPath { - return [self relativePathToUserFolderSubPath:@"Calendar/"]; -} - -- (NSString *)relativeContactsPath { - return [self relativePathToUserFolderSubPath:@"Contacts/"]; -} - -- (NSString *)relativeMailPath { - return [self relativePathToUserFolderSubPath:@"Mail/"]; -} - -/* objects */ - -- (id)calendarFolder { - return [[self clientObject] lookupName:@"Calendar" - inContext:[self context] - acquire:NO]; -} - -/* checking access */ - -- (BOOL)canAccess { - WOContext *ctx; - NSString *owner; - - ctx = [self context]; - owner = [[self clientObject] ownerInContext:ctx]; - return [owner isEqualToString:[[ctx activeUser] login]]; -} - -- (BOOL)isNotAllowedToChangeInternetAccess { - // TODO: should be a SOGoUser method - AgenorUserManager *um; - WOContext *ctx; - NSString *uid; - - ctx = [self context]; - /* do not allow changes when access is from Internet */ - if (![ctx isAccessFromIntranet]) - return YES; - um = [AgenorUserManager sharedUserManager]; - uid = [[ctx activeUser] login]; - return [um isUserAllowedToChangeSOGoInternetAccess:uid] ? NO : YES; -} - -- (BOOL)isVacationMessageEnabledForInternet { - // TODO: should be a SOGoUser method - AgenorUserManager *um; - NSString *uid; - - um = [AgenorUserManager sharedUserManager]; - uid = [[[self context] activeUser] login]; - return [um isInternetAutoresponderEnabledForUser:uid]; -} - -- (BOOL)isVacationMessageEnabledForIntranet { - // TODO: should be a SOGoUser method - AgenorUserManager *um; - NSString *uid; - - um = [AgenorUserManager sharedUserManager]; - uid = [[[self context] activeUser] login]; - return [um isIntranetAutoresponderEnabledForUser:uid]; -} - -/* actions */ - -#if 0 -- (id)defaultAction { - return [self redirectToLocation:[self relativeCalendarPath]]; -} -#endif - -/* this is triggered by an XMLHTTPRequest */ -- (id)saveInternetAccessStateAction { - NSString *state; - - if ([self isNotAllowedToChangeInternetAccess]) - return [NSException exceptionWithHTTPStatus:403 /* Forbidden */]; - - state = [[[self context] request] formValueForKey:@"allowinternet"]; - [self setInternetAccessState:state]; - return [NSException exceptionWithHTTPStatus:200 /* OK */]; -} - -@end /* SOGoUserHomePage */ diff --git a/Main/SOGoUserHomePage.wox b/Main/SOGoUserHomePage.wox deleted file mode 100644 index d09439a0..00000000 --- a/Main/SOGoUserHomePage.wox +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - -
- - - - - -
- - - - - - -
-
-

- - - - - - -
- : - - - -

-

- -

-
- - - - - - - - - - - -
-
- - - -
- - -
-
-
-
-
diff --git a/Main/TODO b/Main/TODO deleted file mode 100644 index fbbab2d1..00000000 --- a/Main/TODO +++ /dev/null @@ -1 +0,0 @@ -# $Id$ diff --git a/Main/Version b/Main/Version index 092b6114..95f9a975 100644 --- a/Main/Version +++ b/Main/Version @@ -1,6 +1,6 @@ # Version file -SUBMINOR_VERSION:=38 +SUBMINOR_VERSION:=39 # v0.9.32 requires libSOGo v0.9.57 # v0.9.24 requires libWEExtensions v4.5.67 diff --git a/Main/common.h b/Main/common.h index ea6a4dbf..f29bf747 100644 --- a/Main/common.h +++ b/Main/common.h @@ -18,7 +18,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ #import diff --git a/Main/homepage.js b/Main/homepage.js deleted file mode 100644 index b98b9a17..00000000 --- a/Main/homepage.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright (C) 2005 SKYRIX Software AG - - This file is part of OpenGroupware.org. - - OGo is free software; you can redistribute it and/or modify it under - the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - OGo is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with OGo; see the file COPYING. If not, write to the - Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. - */ -/* JavaScript for SOGo Homepage */ - -function toggleInternetAccessState(sender) { -// var form = document.getElementById("syncDefaultsForm"); -// document.syncDefaultsForm.action="saveInternetAccessState:method"; -// form.submit(); - this.postInternetAccessState(sender, sender.value); - return true; -} - -function postInternetAccessState(sender, state) { - var url; - var http = createHTTPClient(); - - url = "edit?allowinternet=" + state; - - if (http) { - http.open("POST", url, false); - http.send(""); - if (http.status != 200) { - alert("Failed to change state: " + http.statusText); - window.location.reload(); - } - } - else { - alert("Unable to retrieve HTTPClient object!"); - window.location.href = url; - } -} diff --git a/Main/product.plist b/Main/product.plist deleted file mode 100644 index c989288b..00000000 --- a/Main/product.plist +++ /dev/null @@ -1,106 +0,0 @@ -{ - requires = ( MAIN ); - - publicResources = ( - ); - - classes = { - SOGo = { - superclass = "SoApplication"; - protectedBy = "View"; - defaultAccess = "allow"; - defaultRoles = { - "View" = "Authenticated"; - "WebDAV Access" = "Authenticated"; - }; - methods = { - index = { - protectedBy = "View"; - pageName = "SOGoRootPage"; - }; - GET = { // more or less a hack, see README of dbd - protectedBy = "View"; - pageName = "SOGoRootPage"; - }; - connect = { - protectedBy = "View"; - pageName = "SOGoRootPage"; - actionName = "connect"; - }; - }; - }; - - SOGoRootPage = { - superclass = "SoComponent"; - protectedBy = "View"; - defaultRoles = { - "View" = "Authenticated"; - }; - }; - - SOGoObject = { - protectedBy = "View"; - defaultAccess = "allow"; - defaultRoles = { - "View" = "Authenticated"; - "WebDAV Access" = "Authenticated"; - }; - }; - SOGoContentObject = { - superclass = "SOGoObject"; - }; - SOGoFolder = { - superclass = "SOGoObject"; - }; - - SOGoUserFolder = { - superclass = "SOGoFolder"; - - defaultRoles = { - "HomePage Access" = "Owner"; - }; - - methods = { - view = { - protectedBy = "HomePage Access"; - pageName = "SOGoUserHomePage"; - }; - edit = { - protectedBy = "HomePage Access"; - pageName = "SOGoUserHomePage"; - actionName = "saveInternetAccessState"; - }; - /* - GET = { // more or less a hack, see README of dbd - protectedBy = "HomePage Access"; - pageName = "SOGoUserHomePage"; - }; - */ - }; - }; - - SOGoGroupsFolder = { - superclass = "SOGoObject"; - methods = { - index = { - protectedBy = "View"; - pageName = "SOGoGroupsPage"; - }; - }; - }; - SOGoGroupFolder = { - superclass = "SOGoObject"; - methods = { - index = { - protectedBy = "View"; - pageName = "SOGoGroupPage"; - }; - }; - }; - SOGoCustomGroupFolder = { - superclass = "SOGoGroupFolder"; - methods = { - }; - }; - }; -} diff --git a/UI/GNUmakefile b/UI/GNUmakefile index 002e73cb..4be5b3bd 100644 --- a/UI/GNUmakefile +++ b/UI/GNUmakefile @@ -5,6 +5,7 @@ include $(GNUSTEP_MAKEFILES)/common.make SUBPROJECTS += \ SOGoUI \ + MainUI \ Common \ Scheduler \ Contacts \ diff --git a/UI/MainUI/README b/UI/MainUI/README index 36c80043..7f334008 100644 --- a/UI/MainUI/README +++ b/UI/MainUI/README @@ -1,68 +1,4 @@ -SOGo -==== +MainUI +====== -Master Daemon, loads the functionality from product bundles in Library/SOGo. - -Setup -===== - - Defaults write sogod NGBundlePath '"$HOME/Library/SOGo"' - => otherwise some bundles will clash with "fat" OGo - => the UIx .wox driver must be found - -Defaults -======== - - SOGoDefaultLanguage - string - currently used for selecting the language of - the mail templates. Default is "French". - - SOGoCrashOnSessionCreate - bool - crash the server if a session is created - => useful for debugging - - SOGoEnableDoubleReleaseCheck - bool - call - +[NSAutoreleasePool enableDoubleReleaseCheck:YES] upon start - => useful for debugging - -SOGoInternetDetectQualifier -- an EOQualifier to detect whether a set of HTTP headers is from the outside, - eg: "NOT (minequprovenance = 'intranet')" - -SOGoInternetDetectQualifier '"NOT (minequprovenance = \"intranet\")"' - Note: all header field names are lowercase - Testing: -SOGoInternetDetectQualifier '"host = \"agenor.opengroupware.org\""' - -AgenorProfileURL - URL -- configure database location of the user profile - eg: http://postgres:@agenor-db:5432/test/sogo_user_profile - -SOGoDoNotRedirectRootPage - YES|NO -- do not redirect to home-folder for authenticated users but show the - root page (with the login name) - -What it does -============ -- provides locale support -- preloads the SOGo products (SOGoProductLoader) -- provides the root object (the application object with user lookup) -- sets the authenticator -- does some process limits and restart support - -Apache Setup -============ - - AliasMatch /SOGoHH/so/ControlPanel/Products/(.*)/Resources/(.*) \ - /home/helge/GNUstep/Library/SOGo-0.9/$1.SOGo/Resources/$2 - - - AuthName "Agenor LDAP" - AuthType Basic - AuthLDAPEnabled on - AuthLDAPUrl ldap://agenor-ldap:389/ou=organisation,dc=equipement,dc=gouv,dc=fr??sub?(&(objectClass=person)(uid=*)) - require valid-user - - SetHandler ngobjweb-adaptor - SetAppPort 9000 - - - - SetHandler default-handler - +TODO: document -- 2.39.5