Monotone-Parent: d2bd6bcda5a12e544ed133a4000f1101dc14908c

Monotone-Revision: 84bc6f895c1a0b4e4455df229813dc1774f0be43

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-09-06T22:19:05
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2007-09-06 22:19:05 +00:00
parent ae953f65c9
commit 4729c4aef1
2 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,9 @@
2007-09-06 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/MainUI/SOGoUserHomePage.m ([SOGoUserHomePage -logoffAction]):
set the value of the cookie to "discard" and set its expiration
date to yesterday.
* SoObjects/SOGo/SOGoWebAuthenticator.m ([SOGoWebAuthenticator
-preprocessCredentialsInContext:context]): consider the user
anonymous if the cookie value is "discard".

View File

@ -203,10 +203,10 @@ static NSString *defaultModule = nil;
- (id <WOActionResults>) logoffAction
{
WOResponse *response;
NSEnumerator *cookies;
WOCookie *cookie;
SOGoWebAuthenticator *auth;
id container;
NSCalendarDate *date;
container = [[self clientObject] container];
@ -214,11 +214,12 @@ static NSString *defaultModule = nil;
[response setStatus: 302];
[response setHeader: [container baseURLInContext: context]
forKey: @"location"];
cookies = [[response cookies] objectEnumerator];
auth = [[self clientObject] authenticatorInContext: context];
cookie = [WOCookie cookieWithName: [auth cookieNameInContext: context]
value: @"logoff"];
value: @"discard"];
[cookie setPath: @"/"];
date = [NSCalendarDate calendarDate];
[cookie setExpires: [date yesterday]];
[response addCookie: cookie];
return response;