Monotone-Parent: ab81a2b3344ce13069fdc2f4762e128a13136bb3

Monotone-Revision: 6f946a78a43cf1914cfbcff43562c9c0ed48a1b0

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-07-25T17:52:49
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2008-07-25 17:52:49 +00:00
parent 8a17179ab1
commit c4f917942d
19 changed files with 69 additions and 149 deletions
+8
View File
@@ -1,3 +1,11 @@
2008-07-25 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/AgenorUserDefaults.[hm]: renamed module class and
class moduel to SOGoUserDefaults.
* Main/SOGo.m ([SOGo -run]): the table referred to as
"AgenorProfileURL" is now referred to as "SOGoProfileURL".
2008-07-24 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoWebAuthenticator.m ([SOGoWebAuthenticator -checkLogin:_loginpassword:_pwd]),
+10 -1
View File
@@ -224,7 +224,7 @@ static BOOL debugObjectAllocation = NO;
- (BOOL) _checkMandatoryTables
{
GCSChannelManager *cm;
NSString *urlStrings[] = {@"AgenorProfileURL", @"OCSFolderInfoURL", nil};
NSString *urlStrings[] = {@"SOGoProfileURL", @"OCSFolderInfoURL", nil};
NSString **urlString;
NSString *value;
NSUserDefaults *ud;
@@ -238,6 +238,15 @@ static BOOL debugObjectAllocation = NO;
while (ok && *urlString)
{
value = [ud stringForKey: *urlString];
if (!value & [*urlString isEqualToString: @"SOGoProfileURL"])
{
value = [ud stringForKey: @"AgenorProfileURL"];
if (value)
[self warnWithFormat: @"the user defaults key 'AgenorProfileURL'"
@" was renamed to 'SOGoProfileURL', please update your"
@" configuration accordingly"];
}
if (value)
{
[self _checkTableWithCM: cm tableURL: value andType: *urlString];
+9 -9
View File
@@ -10,10 +10,10 @@ FRAMEWORK_NAME = SOGo
SOGo_INSTALL_DIR = $(SOGO_LIBDIR)
TOOL_NAME = \
# agenor_email2uid \
# agenor_shares4uid \
# agenor_emails4uid \
# agenor_defaults
# sogo_email2uid \
# sogo_shares4uid \
# sogo_emails4uid \
# sogo_defaults
SOGo_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION)
@@ -75,7 +75,7 @@ SOGo_OBJC_FILES = \
SOGoPermissions.m \
LDAPUserManager.m \
LDAPSource.m \
AgenorUserDefaults.m \
SOGoUserDefaults.m \
iCalEntityObject+Utilities.m \
NSArray+DAV.m \
NSArray+Utilities.m \
@@ -108,10 +108,10 @@ SOGo_RESOURCE_FILES = \
# tools
agenor_email2uid_OBJC_FILES += agenor_email2uid.m
agenor_shares4uid_OBJC_FILES += agenor_shares4uid.m
agenor_emails4uid_OBJC_FILES += agenor_emails4uid.m
agenor_defaults_OBJC_FILES += agenor_defaults.m
sogo_email2uid_OBJC_FILES += sogo_email2uid.m
sogo_shares4uid_OBJC_FILES += sogo_shares4uid.m
sogo_emails4uid_OBJC_FILES += sogo_emails4uid.m
sogo_defaults_OBJC_FILES += sogo_defaults.m
ADDITIONAL_TOOL_LIBS += -Lobj -lSOGo$(LIBRARY_NAME_SUFFIX)
ADDITIONAL_INCLUDE_DIRS += -I../../SOPE/
+1 -1
View File
@@ -28,7 +28,7 @@
SOGoUser
This adds some additional SOGo properties to the SoUser object. The
properties are (currently) looked up using the AgenorUserManager.
properties are (currently) looked up using the LDAPUserManager.
You have access to this object from the WOContext:
context.activeUser
+13 -11
View File
@@ -35,7 +35,7 @@
#import <NGExtensions/NSNull+misc.h>
#import <NGExtensions/NSObject+Logs.h>
#import "AgenorUserDefaults.h"
#import "SOGoUserDefaults.h"
#import "LDAPUserManager.h"
#import "NSArray+Utilities.h"
#import "SOGoCache.h"
@@ -50,7 +50,7 @@ static NSString *fallbackIMAP4Server = nil;
static BOOL fallbackIsConfigured = NO;
static NSString *defaultLanguage = nil;
static NSArray *superUsernames = nil;
static NSURL *AgenorProfileURL = nil;
static NSURL *SOGoProfileURL = nil;
// static BOOL acceptAnyUser = NO;
static int sogoFirstDayOfWeek = -1;
static int defaultDayStartTime = -1;
@@ -122,10 +122,12 @@ _timeValue (NSString *key)
defaultDayEndTime = 18;
}
if (!AgenorProfileURL)
if (!SOGoProfileURL)
{
profileURL = [ud stringForKey: @"AgenorProfileURL"];
AgenorProfileURL = [[NSURL alloc] initWithString: profileURL];
profileURL = [ud stringForKey: @"SOGoProfileURL"];
if (!profileURL)
profileURL = [ud stringForKey: @"AgenorProfileURL"];
SOGoProfileURL = [[NSURL alloc] initWithString: profileURL];
}
if (!fallbackIMAP4Server)
ASSIGN (fallbackIMAP4Server,
@@ -432,9 +434,9 @@ _timeValue (NSString *key)
{
if (!userDefaults)
userDefaults
= [[AgenorUserDefaults alloc] initWithTableURL: AgenorProfileURL
uid: login
fieldName: @"c_defaults"];
= [[SOGoUserDefaults alloc] initWithTableURL: SOGoProfileURL
uid: login
fieldName: @"c_defaults"];
return userDefaults;
}
@@ -443,9 +445,9 @@ _timeValue (NSString *key)
{
if (!userSettings)
userSettings
= [[AgenorUserDefaults alloc] initWithTableURL: AgenorProfileURL
uid: login
fieldName: @"c_settings"];
= [[SOGoUserDefaults alloc] initWithTableURL: SOGoProfileURL
uid: login
fieldName: @"c_settings"];
return userSettings;
}
@@ -19,13 +19,13 @@
02111-1307, USA.
*/
#ifndef __AgenorUserDefaults_H_
#define __AgenorUserDefaults_H_
#ifndef __SOGoUserDefaults_H_
#define __SOGoUserDefaults_H_
#import <Foundation/NSObject.h>
/*
AgenorUserDefaults
SOGoUserDefaults
An object with the same API like NSUserDefaults which retrieves profile
information for users in the database.
@@ -34,7 +34,7 @@
@class NSString, NSURL, NSUserDefaults, NSArray, NSDictionary, NSData;
@class NSCalendarDate, NSMutableDictionary;
@interface AgenorUserDefaults : NSObject
@interface SOGoUserDefaults : NSObject
{
NSUserDefaults *parent;
NSURL *url;
@@ -86,4 +86,4 @@
@end
#endif /* __AgenorUserDefaults_H__ */
#endif /* __SOGoUserDefaults_H__ */
@@ -35,9 +35,9 @@
#import "NSObject+Utilities.h"
#import "AgenorUserDefaults.h"
#import "SOGoUserDefaults.h"
@implementation AgenorUserDefaults
@implementation SOGoUserDefaults
static NSString *uidColumnName = @"c_uid";
@@ -454,4 +454,4 @@ static NSString *uidColumnName = @"c_uid";
forKey: key];
}
@end /* AgenorUserDefaults */
@end /* SOGoUserDefaults */
@@ -19,7 +19,7 @@
02111-1307, USA.
*/
#include "AgenorUserManager.h"
#include "LDAPUserManager.h"
#include "common.h"
static void usage(NSArray *args) {
@@ -42,7 +42,7 @@ static void doRead(NSUserDefaults *defaults, NSString *key) {
defNames = [defaults valueForKey:@"primaryDefaultNames"];
if ((count = [defNames count]) == 0) {
fprintf(stderr, "There are no keys in the Agenor profile!\n");
fprintf(stderr, "There are no keys in the SOGo profile!\n");
return;
}
@@ -54,7 +54,7 @@ static void doRead(NSUserDefaults *defaults, NSString *key) {
}
}
else if ((value = [defaults objectForKey:key]) == nil) {
fprintf(stderr, "There is no key '%s' in the Agenor profile!\n",
fprintf(stderr, "There is no key '%s' in the SOGo profile!\n",
[key cString]);
}
else
@@ -71,7 +71,7 @@ static void doWrite(NSUserDefaults *defaults, NSString *key, NSString *value) {
}
static void doIt(NSArray *args) {
AgenorUserManager *userManager;
LDAPUserManager *userManager;
NSUserDefaults *defaults;
NSString *uid, *op, *key, *value;
@@ -100,7 +100,7 @@ static void doIt(NSArray *args) {
/* run */
userManager = [AgenorUserManager sharedUserManager];
userManager = [LDAPUserManager sharedUserManager];
defaults = [userManager getUserDefaultsForUID:uid];
if (![defaults isNotNull]) {
@@ -19,7 +19,7 @@
02111-1307, USA.
*/
#include "AgenorUserManager.h"
#include "LDAPUserManager.h"
#include "common.h"
static void usage(NSArray *args) {
@@ -28,7 +28,7 @@ static void usage(NSArray *args) {
}
static void doIt(NSArray *args) {
AgenorUserManager *userManager;
LDAPUserManager *userManager;
NSEnumerator *e;
NSString *email;
@@ -37,7 +37,7 @@ static void doIt(NSArray *args) {
return;
}
userManager = [AgenorUserManager sharedUserManager];
userManager = [LDAPUserManager sharedUserManager];
e = [args objectEnumerator];
[e nextObject]; /* consume the command name */
@@ -19,7 +19,7 @@
02111-1307, USA.
*/
#include "AgenorUserManager.h"
#include "LDAPUserManager.h"
#include "common.h"
static void usage(NSArray *args) {
@@ -27,7 +27,7 @@ static void usage(NSArray *args) {
[[args objectAtIndex:0] cString]);
}
static void handleUID(NSString *uid, AgenorUserManager *userManager) {
static void handleUID(NSString *uid, LDAPUserManager *userManager) {
NSArray *emails;
NSString *primary;
unsigned i, count;
@@ -52,7 +52,7 @@ static void handleUID(NSString *uid, AgenorUserManager *userManager) {
}
static void doIt(NSArray *args) {
AgenorUserManager *userManager;
LDAPUserManager *userManager;
NSEnumerator *e;
NSString *uid;
@@ -61,7 +61,7 @@ static void doIt(NSArray *args) {
return;
}
userManager = [AgenorUserManager sharedUserManager];
userManager = [LDAPUserManager sharedUserManager];
e = [args objectEnumerator];
[e nextObject]; /* consume the command name */
@@ -19,7 +19,7 @@
02111-1307, USA.
*/
#include "AgenorUserManager.h"
#include "LDAPUserManager.h"
#include "common.h"
static void usage(NSArray *args) {
@@ -27,7 +27,7 @@ static void usage(NSArray *args) {
[[args objectAtIndex:0] cString]);
}
static void handleUID(NSString *uid, AgenorUserManager *userManager) {
static void handleUID(NSString *uid, LDAPUserManager *userManager) {
NSArray *shares;
unsigned i, count;
@@ -46,7 +46,7 @@ static void handleUID(NSString *uid, AgenorUserManager *userManager) {
}
static void doIt(NSArray *args) {
AgenorUserManager *userManager;
LDAPUserManager *userManager;
NSEnumerator *e;
NSString *uid;
@@ -55,7 +55,7 @@ static void doIt(NSArray *args) {
return;
}
userManager = [AgenorUserManager sharedUserManager];
userManager = [LDAPUserManager sharedUserManager];
e = [args objectEnumerator];
[e nextObject]; /* consume the command name */
+2 -2
View File
@@ -18,8 +18,8 @@ MainUI_OBJC_FILES += \
MainUI_RESOURCE_FILES += \
Version \
product.plist \
AgenorProfile.sql \
AgenorProfile-oracle.sql \
SOGoProfile.sql \
SOGoProfile-oracle.sql \
OCSFolderInfo.sql \
OCSFolderInfo-oracle.sql \
-1
View File
@@ -22,7 +22,6 @@ SchedulerUI_OBJC_FILES = \
UIxCalDateSelector.m \
UIxCalUserRightsEditor.m \
\
UIxComponent+Scheduler.m \
UIxCalView.m \
UIxCalDayView.m \
UIxCalMulticolumnDayView.m \
-2
View File
@@ -39,8 +39,6 @@
#import <SOGoUI/SOGoAptFormatter.h>
#import "UIxComponent+Scheduler.h"
#import "UIxCalView.h"
@interface UIxCalView (PrivateAPI)
-35
View File
@@ -1,35 +0,0 @@
/*
Copyright (C) 2000-2004 SKYRIX Software AG
This file is part of OGo
OGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with OGo; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
// $Id: UIxComponent+Scheduler.h 1052 2007-05-09 19:35:09Z wolfgang $
#ifndef __UIxComponent_Agenor_H_
#define __UIxComponent_Agenor_H_
#include <SOGoUI/UIxComponent.h>
@interface UIxComponent (Agenor)
- (NSArray *) getICalPersonsFromValue: (NSString *) selectorValue;
@end
#endif /* __UIxComponent_Agenor_H_ */
-59
View File
@@ -1,59 +0,0 @@
/*
Copyright (C) 2000-2005 SKYRIX Software AG
This file is part of OpenGroupware.org.
OGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public
License along with OGo; see the file COPYING. If not, write to the
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#import <Foundation/NSArray.h>
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSString.h>
#import <SoObjects/Appointments/SOGoCalendarComponent.h>
#import "UIxComponent+Scheduler.h"
@implementation UIxComponent(Agenor)
- (NSArray *) getICalPersonsFromValue: (NSString *) selectorValue
{
NSMutableArray *persons;
NSEnumerator *uids;
NSString *uid;
SOGoCalendarComponent *component;
component = [self clientObject];
persons = [NSMutableArray new];
[persons autorelease];
if ([selectorValue length] > 0)
{
uids = [[selectorValue componentsSeparatedByString: @","]
objectEnumerator];
uid = [uids nextObject];
while (uid)
{
[persons addObject: [component iCalPersonWithUID: uid]];
uid = [uids nextObject];
}
}
return persons;
}
@end /* UIxComponent(Agenor) */
+2 -4
View File
@@ -55,8 +55,6 @@
#import <SoObjects/SOGo/SOGoUser.h>
#import <SoObjects/SOGo/SOGoPermissions.h>
#import "UIxComponent+Scheduler.h"
#import "UIxComponentEditor.h"
#define iREPEAT(X) \
@@ -1191,11 +1189,11 @@ RANGE(2);
// - (NSString *) iCalStringFromQueryParameter: (NSString *) _qp
// format: (NSString *) _format
// {
// AgenorUserManager *um;
// LDAPUserManager *um;
// NSMutableString *iCalRep;
// NSString *s;
// um = [AgenorUserManager sharedUserManager];
// um = [LDAPUserManager sharedUserManager];
// iCalRep = (NSMutableString *)[NSMutableString string];
// s = [self queryParameterForKey:_qp];
// if(s && [s length] > 0) {