mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-30 09:19:28 +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:
@@ -1,5 +1,11 @@
|
||||
2010-06-10 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/Common/UIxPageFrame.m (-canLogoff)): return YES when the
|
||||
authentication type is set to "cas" and SOGoCASLogoutEnabled is
|
||||
set.
|
||||
(-logoffPath): return an href to the CAS service logout URL when
|
||||
using "cas" as authentication type.
|
||||
|
||||
* SoObjects/SOGo/SOGoSystemDefaults.m (-CASLogoutEnabled): new
|
||||
method that returns whether the "SOGoCASLogoutEnabled" ud is set.
|
||||
|
||||
|
||||
@@ -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