From f0cad69cac57a6c435de08f794e888dd5e691523 Mon Sep 17 00:00:00 2001 From: helge Date: Wed, 30 Jun 2004 09:44:35 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/trunk@106 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/Main/GNUmakefile | 2 ++ SOGo/Main/SOGoRootPage.m | 3 +++ SOGo/Main/SOGoUserHomePage.m | 38 ++++++++++++++++++++++++++++++++++ SOGo/Main/SOGoUserHomePage.wox | 18 ++++++++++++++++ SOGo/Main/product.plist | 10 +++++++++ 5 files changed, 71 insertions(+) create mode 100644 SOGo/Main/SOGoUserHomePage.m create mode 100644 SOGo/Main/SOGoUserHomePage.wox diff --git a/SOGo/Main/GNUmakefile b/SOGo/Main/GNUmakefile index b47ba64e..d55e93b7 100644 --- a/SOGo/Main/GNUmakefile +++ b/SOGo/Main/GNUmakefile @@ -10,12 +10,14 @@ sogod_OBJC_FILES += \ SOGoAuthenticator.m \ \ SOGoRootPage.m \ + SOGoUserHomePage.m \ sogod_RESOURCE_FILES += \ Version \ product.plist \ \ SOGoRootPage.wox \ + SOGoUserHomePage.wox \ sogod_WEBSERVER_RESOURCE_FILES += diff --git a/SOGo/Main/SOGoRootPage.m b/SOGo/Main/SOGoRootPage.m index 80d25ac0..506856d2 100644 --- a/SOGo/Main/SOGoRootPage.m +++ b/SOGo/Main/SOGoRootPage.m @@ -56,6 +56,9 @@ - (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) { diff --git a/SOGo/Main/SOGoUserHomePage.m b/SOGo/Main/SOGoUserHomePage.m new file mode 100644 index 00000000..1161735a --- /dev/null +++ b/SOGo/Main/SOGoUserHomePage.m @@ -0,0 +1,38 @@ +// $Id$ + +#include + +@interface SOGoUserHomePage : SoComponent +{ +} + +@end + +#include "common.h" + +@implementation SOGoUserHomePage + +- (id)initWithContext:(id)_ctx { + if ((self = [super initWithContext:_ctx])) { + } + return self; +} + +- (void)dealloc { + [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; +} + +@end /* SOGoUserHomePage */ diff --git a/SOGo/Main/SOGoUserHomePage.wox b/SOGo/Main/SOGoUserHomePage.wox new file mode 100644 index 00000000..027fbae4 --- /dev/null +++ b/SOGo/Main/SOGoUserHomePage.wox @@ -0,0 +1,18 @@ + + + + Scalable OGo User Homepage + + + +

OpenGroupware.org:

+ + + + diff --git a/SOGo/Main/product.plist b/SOGo/Main/product.plist index 0f27d86e..d017ef24 100644 --- a/SOGo/Main/product.plist +++ b/SOGo/Main/product.plist @@ -45,6 +45,16 @@ SOGoUserFolder = { superclass = "SOGoFolder"; + methods = { + index = { + protectedBy = "View"; + pageName = "SOGoUserHomePage"; + }; + GET = { // more or less a hack, see README of dbd + protectedBy = "View"; + pageName = "SOGoUserHomePage"; + }; + }; }; }; } -- 2.39.5