mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-23 10:54:17 +00:00
Monotone-Parent: ec985fb9e6b66a8966484429823a42e99822facc
Monotone-Revision: 9710a1d0cb659a58b931bdacad52d1d28dbbbe47 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-09-05T14:55:58 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2007-09-05 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/SOGoUI/UIxComponent.m ([UIxComponent
|
||||
-shortUserNameForDisplay]): simplified method.
|
||||
([-user]): removed method since [context activeUser] is as useful.
|
||||
|
||||
2007-09-04 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/MainUI/SOGoUserHomePage.m ([SOGoUserHomePage -logoffAction]):
|
||||
|
||||
@@ -75,7 +75,6 @@
|
||||
- (UIxComponent *) jsCloseWithRefreshMethod: (NSString *) methodName;
|
||||
|
||||
/* SoUser */
|
||||
- (SoUser *)user;
|
||||
- (NSString *)shortUserNameForDisplay;
|
||||
|
||||
/* labels */
|
||||
|
||||
@@ -418,35 +418,9 @@ static BOOL uixDebugEnabled = NO;
|
||||
|
||||
/* SoUser */
|
||||
|
||||
- (SoUser *) user
|
||||
{
|
||||
WOContext *ctx;
|
||||
|
||||
ctx = context;
|
||||
|
||||
return [[[self clientObject] authenticatorInContext: ctx] userInContext: ctx];
|
||||
}
|
||||
|
||||
- (NSString *) shortUserNameForDisplay
|
||||
{
|
||||
// TODO: better use a SoUser formatter?
|
||||
// TODO: who calls that?
|
||||
NSString *s;
|
||||
NSRange r;
|
||||
|
||||
// TODO: USE USER MANAGER INSTEAD!
|
||||
|
||||
s = [[self user] login];
|
||||
if ([s length] < 10)
|
||||
return s;
|
||||
|
||||
// TODO: algorithm might be inappropriate, depends on the actual UID
|
||||
|
||||
r = [s rangeOfString:@"."];
|
||||
if (r.length == 0)
|
||||
return s;
|
||||
|
||||
return [s substringToIndex:r.location];
|
||||
return [[context activeUser] login];
|
||||
}
|
||||
|
||||
/* labels */
|
||||
|
||||
Reference in New Issue
Block a user