Monotone-Parent: 1915e9dbb25e68de74dac3bf1f7971c87ce2bf5c
Monotone-Revision: 0f28c38403961b687cf6ca703e2d8b420dc03e4a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-06-22T19:59:54 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
5c27e60602
commit
5ad5ad063c
|
@ -1,5 +1,10 @@
|
||||||
2007-06-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
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
|
* SoObjects/SOGo/SOGoUser.m ([SOGoUser +initialize]): new module
|
||||||
bool var "acceptAnyUser" that is set when the AuthenticationMethod
|
bool var "acceptAnyUser" that is set when the AuthenticationMethod
|
||||||
user default is nil.
|
user default is nil.
|
||||||
|
|
|
@ -24,20 +24,34 @@
|
||||||
|
|
||||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||||
#import <NGObjWeb/WODirectAction.h>
|
#import <NGObjWeb/WODirectAction.h>
|
||||||
|
#import <NGObjWeb/WOResponse.h>
|
||||||
|
|
||||||
|
#import <SoObjects/SOGo/NSObject+Utilities.h>
|
||||||
#import <SoObjects/SOGo/SOGoUser.h>
|
#import <SoObjects/SOGo/SOGoUser.h>
|
||||||
|
|
||||||
#import "UIxJSONPreferences.h"
|
#import "UIxJSONPreferences.h"
|
||||||
|
|
||||||
@implementation UIxJSONPreferences
|
@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
|
- (WOResponse *) jsonDefaultsAction
|
||||||
{
|
{
|
||||||
NSUserDefaults *defaults;
|
NSUserDefaults *defaults;
|
||||||
|
|
||||||
defaults = [[context activeUser] userDefaults];
|
defaults = [[context activeUser] userDefaults];
|
||||||
|
|
||||||
return [defaults jsonRepresentation];
|
return [self _makeResponse: [defaults jsonRepresentation]];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (WOResponse *) jsonSettingsAction
|
- (WOResponse *) jsonSettingsAction
|
||||||
|
@ -46,7 +60,7 @@
|
||||||
|
|
||||||
settings = [[context activeUser] userSettings];
|
settings = [[context activeUser] userSettings];
|
||||||
|
|
||||||
return [settings jsonRepresentation];
|
return [self _makeResponse: [settings jsonRepresentation]];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in a new issue