Monotone-Parent: 1915e9dbb25e68de74dac3bf1f7971c87ce2bf5c

Monotone-Revision: 0f28c38403961b687cf6ca703e2d8b420dc03e4a

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-06-22T19:59:54
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2007-06-22 19:59:54 +00:00
parent 5c27e60602
commit 5ad5ad063c
2 changed files with 21 additions and 2 deletions

View File

@ -1,5 +1,10 @@
2007-06-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/PreferencesUI/UIxJSONPreferences.m ([UIxJSONPreferences
-jsonDefaultsAction]): bug fix: returns a WOResponse instance with
the string instead of the string itself.
([UIxJSONPreferences -jsonSettingsAction]): same as above.
* SoObjects/SOGo/SOGoUser.m ([SOGoUser +initialize]): new module
bool var "acceptAnyUser" that is set when the AuthenticationMethod
user default is nil.

View File

@ -24,20 +24,34 @@
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGObjWeb/WODirectAction.h>
#import <NGObjWeb/WOResponse.h>
#import <SoObjects/SOGo/NSObject+Utilities.h>
#import <SoObjects/SOGo/SOGoUser.h>
#import "UIxJSONPreferences.h"
@implementation UIxJSONPreferences
- (WOResponse *) _makeResponse: (NSString *) jsonText
{
WOResponse *response;
response = [context response];
[response setHeader: @"text/plain; charset=utf-8"
forKey: @"content-type"];
[response appendContentString: jsonText];
return response;
}
- (WOResponse *) jsonDefaultsAction
{
NSUserDefaults *defaults;
defaults = [[context activeUser] userDefaults];
return [defaults jsonRepresentation];
return [self _makeResponse: [defaults jsonRepresentation]];
}
- (WOResponse *) jsonSettingsAction
@ -46,7 +60,7 @@
settings = [[context activeUser] userSettings];
return [settings jsonRepresentation];
return [self _makeResponse: [settings jsonRepresentation]];
}
@end