merge of '9553e562ebed3759fe2052393023f3b5eb697bc0'

and 'a9a496d4716bb30eac90c8ad8d7e50c38bef62c8'

Monotone-Parent: 9553e562ebed3759fe2052393023f3b5eb697bc0
Monotone-Parent: a9a496d4716bb30eac90c8ad8d7e50c38bef62c8
Monotone-Revision: d3bbadcce7472714c99e523e6d397a87aa65bf5b

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-09-13T21:15:22
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-09-13 21:15:22 +00:00
4 changed files with 29 additions and 85 deletions

View File

@@ -1,3 +1,11 @@
2007-09-12 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/MainUI/SOGoRootPage.m ([SOGoRootPage -defaultAction]): test
whether the user is logged in and if so, redirect to his/her
homepage.
([SOGoRootPage -appendToResponse:inContext:]): removed useless
method.
2007-09-11 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoFolder.m ([SOGoFolder

View File

@@ -83,88 +83,24 @@
return response;
}
// - (id <WOActionResults>) defaultAction
// {
// WOResponse *r;
// NSString *login, *rhk;
// SOGoWebAuthenticator *auth;
// SOGoUser *user;
// SOGoUserFolder *home;
// WOApplication *base;
- (id <WOActionResults>) defaultAction
{
id <WOActionResults> response;
NSString *login, *oldLocation;
// /*
// Note: ctx.activeUser is NOT set here. Don't know why, so we retrieve
// the user from the authenticator.
// */
// auth = [[self clientObject] authenticatorInContext: context];
// user = [auth userInContext: context];
// login = [user login];
login = [[context activeUser] login];
if ([login isEqualToString: @"anonymous"])
response = self;
else
{
oldLocation = [[self clientObject] baseURLInContext: context];
response
= [self redirectToLocation: [NSString stringWithFormat: @"%@/%@",
oldLocation, login]];
}
// if ([login isEqualToString:@"anonymous"]) {
// /* use root page for unauthenticated users */
// return self;
// }
// /* check base */
// base = [self application];
// rhk = [[context request] requestHandlerKey];
// if (([rhk length] == 0) || ([base requestHandlerForKey:rhk] == nil)) {
// base = [base lookupName: @"so" inContext: 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: 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 = [context response];
// [r setStatus: 302 /* moved */];
// [r setHeader: [home baseURLInContext: 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;
// }
// [response setHeader: @"text/html" forKey: @"content-type"];
// [super appendToResponse: response inContext: ctx];
// }
return response;
}
- (BOOL) isPublicInContext: (WOContext *) localContext
{

View File

@@ -12,10 +12,10 @@ DIV#loginScreen
background-color: #d4d0c8;
margin: 0px auto;
margin-top: 5em;
padding: 10px;
padding: 5px;
border: 2px solid transparent;
width: 197px;
height: 300px;
width: 200px;
height: 315px;
-moz-border-top-colors: #efebe7 #fff;
-moz-border-left-colors: #efebe7 #fff;
-moz-border-right-colors: #000 #9c9a94 transparent;
@@ -26,8 +26,8 @@ DIV#loginScreen IMG
{ border: 0px;
margin: 0px;
padding: 0px;
height: 192px;
width: 192px; }
height: 200px;
width: 200px; }
DIV#loginScreen INPUT.textField
{ width: 187px; }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB