mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-05 20:10:33 +00:00
Monotone-Parent: 227d08b1bace5a1e7b0760cc82dc7381016175ae
Monotone-Revision: a1b9a10da6c763d93711deaf538e81314618e5e7 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-06-10T18:42:26 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#import <NGObjWeb/WOResourceManager.h>
|
||||
|
||||
#import <SOGo/NSDictionary+Utilities.h>
|
||||
#import <SOGo/NSString+Utilities.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserDefaults.h>
|
||||
#import <SOGo/SOGoUserProfile.h>
|
||||
@@ -155,7 +156,18 @@
|
||||
|
||||
- (NSString *) logoffPath
|
||||
{
|
||||
return [self relativePathToUserFolderSubPath: @"logoff"];
|
||||
NSString *logoffPath;
|
||||
SOGoSystemDefaults *sd;
|
||||
|
||||
sd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
if ([[sd authenticationType] isEqualToString: @"cas"])
|
||||
logoffPath = [[sd CASServiceURL] composeURLWithAction: @"logout"
|
||||
parameters: nil
|
||||
andHash: NO];
|
||||
else
|
||||
logoffPath = [self relativePathToUserFolderSubPath: @"logoff"];
|
||||
|
||||
return logoffPath;
|
||||
}
|
||||
|
||||
/* popup handling */
|
||||
@@ -416,8 +428,9 @@
|
||||
if ([auth respondsToSelector: @selector (cookieNameInContext:)])
|
||||
{
|
||||
sd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
canLogoff = ([[auth cookieNameInContext: context] length] > 0
|
||||
&& ![[sd authenticationType] isEqualToString: @"cas"]);
|
||||
canLogoff = (([[sd authenticationType] isEqualToString: @"cas"]
|
||||
&& [sd CASLogoutEnabled])
|
||||
|| [[auth cookieNameInContext: context] length] > 0);
|
||||
}
|
||||
else
|
||||
canLogoff = NO;
|
||||
|
||||
Reference in New Issue
Block a user