mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-11 23:07:12 +00:00
Monotone-Parent: 50245e5ff224a38e104b57dccfa0384915476341
Monotone-Revision: dba126da77bea65fd37325e4be553aaddcd108d1 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-03-27T18:15:51 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1 parent
0bcd0f561a
commit
577be1b049
3 files changed
+38
-23
No files matched your search
@@ -75,7 +75,8 @@
|
||||
|
||||
- (NSURL *)getFreeBusyURLForUID:(NSString *)_uid;
|
||||
|
||||
- (NSUserDefaults *)getUserDefaultsForUID:(NSString *)_uid;
|
||||
- (NSUserDefaults *) getUserDefaultsForUID: (NSString *) uid;
|
||||
- (NSUserDefaults *) getUserSettingsForUID: (NSString *) uid;
|
||||
|
||||
- (BOOL)isUserAllowedToChangeSOGoInternetAccess:(NSString *)_uid;
|
||||
|
||||
|
||||
@@ -1012,22 +1012,39 @@ static unsigned PoolScanInterval = 5 * 60 /* every five minutes */;
|
||||
|
||||
/* defaults */
|
||||
|
||||
- (NSUserDefaults *)getUserDefaultsForUID:(NSString *)_uid {
|
||||
- (NSUserDefaults *) _getUserDefaultsForUID: (NSString *) uid
|
||||
fieldName: (NSString *) fieldName
|
||||
{
|
||||
id defaults;
|
||||
|
||||
if (AgenorProfileURL == nil) {
|
||||
[self warnWithFormat:
|
||||
@"no profile configured, cannot retrieve defaults for user: '%@'",
|
||||
_uid];
|
||||
return nil;
|
||||
}
|
||||
|
||||
/* Note: do not cache, otherwise updates can be quite tricky */
|
||||
defaults = [[[AgenorUserDefaults alloc]
|
||||
initWithTableURL:AgenorProfileURL uid:_uid] autorelease];
|
||||
if (AgenorProfileURL)
|
||||
{
|
||||
/* Note: do not cache, otherwise updates can be quite tricky */
|
||||
defaults = [[AgenorUserDefaults alloc] initWithTableURL: AgenorProfileURL
|
||||
uid: uid fieldName: fieldName];
|
||||
[defaults autorelease];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self warnWithFormat:
|
||||
@"no profile configured, cannot retrieve defaults for user: '%@'",
|
||||
uid];
|
||||
return defaults = nil;
|
||||
}
|
||||
|
||||
return defaults;
|
||||
}
|
||||
|
||||
- (NSUserDefaults *) getUserDefaultsForUID: (NSString *) uid
|
||||
{
|
||||
return [self _getUserDefaultsForUID: uid fieldName: @"defaults"];
|
||||
}
|
||||
|
||||
- (NSUserDefaults *) getUserSettingsForUID: (NSString *) uid
|
||||
{
|
||||
return [self _getUserDefaultsForUID: uid fieldName: @"settings"];
|
||||
}
|
||||
|
||||
/* internet access lock */
|
||||
|
||||
- (BOOL)isUserAllowedToChangeSOGoInternetAccess:(NSString *)_uid {
|
||||
@@ -1194,15 +1211,4 @@ static unsigned PoolScanInterval = 5 * 60 /* every five minutes */;
|
||||
return debugOn;
|
||||
}
|
||||
|
||||
/* description */
|
||||
|
||||
- (NSString *)description {
|
||||
NSMutableString *ms;
|
||||
|
||||
ms = [NSMutableString stringWithCapacity:16];
|
||||
[ms appendFormat:@"<0x%08X[%@]", self, NSStringFromClass([self class])];
|
||||
[ms appendString:@">"];
|
||||
return ms;
|
||||
}
|
||||
|
||||
@end /* AgenorUserManager */
|
||||
Reference in new issue
Block a user