SOGoAuthenticator.m \
\
SOGoRootPage.m \
+ SOGoUserHomePage.m \
sogod_RESOURCE_FILES += \
Version \
product.plist \
\
SOGoRootPage.wox \
+ SOGoUserHomePage.wox \
sogod_WEBSERVER_RESOURCE_FILES +=
- (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) {
--- /dev/null
+// $Id$
+
+#include <NGObjWeb/SoComponent.h>
+
+@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 */
--- /dev/null
+<?xml version='1.0' standalone='yes'?>
+<html
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:var="http://www.skyrix.com/od/binding"
+ xmlns:const="http://www.skyrix.com/od/constant"
+>
+ <head>
+ <title>Scalable OGo User Homepage</title>
+ </head>
+
+ <body>
+ <h3>OpenGroupware.org: <var:string value="clientObject.login" /></h3>
+
+ <ul>
+ <li><a href="Calendar/">Calendar</a></li>
+ </ul>
+ </body>
+</html>
SOGoUserFolder = {
superclass = "SOGoFolder";
+ methods = {
+ index = {
+ protectedBy = "View";
+ pageName = "SOGoUserHomePage";
+ };
+ GET = { // more or less a hack, see README of dbd
+ protectedBy = "View";
+ pageName = "SOGoUserHomePage";
+ };
+ };
};
};
}