(fix) correctly handle PreventInvitationsWhitelist
This commit is contained in:
parent
6f59955340
commit
a2c469d46a
|
@ -25,6 +25,7 @@
|
||||||
#import <NGObjWeb/WOResponse.h>
|
#import <NGObjWeb/WOResponse.h>
|
||||||
|
|
||||||
#import <SOGo/NSObject+Utilities.h>
|
#import <SOGo/NSObject+Utilities.h>
|
||||||
|
#import <SOGo/NSString+Utilities.h>
|
||||||
#import <SOGo/SOGoUser.h>
|
#import <SOGo/SOGoUser.h>
|
||||||
#import <SOGo/SOGoUserDefaults.h>
|
#import <SOGo/SOGoUserDefaults.h>
|
||||||
#import <SOGo/SOGoUserSettings.h>
|
#import <SOGo/SOGoUserSettings.h>
|
||||||
|
@ -136,9 +137,21 @@
|
||||||
- (WOResponse *) jsonSettingsAction
|
- (WOResponse *) jsonSettingsAction
|
||||||
{
|
{
|
||||||
SOGoUserSettings *settings;
|
SOGoUserSettings *settings;
|
||||||
|
id v;
|
||||||
|
|
||||||
settings = [[context activeUser] userSettings];
|
settings = [[context activeUser] userSettings];
|
||||||
|
|
||||||
|
// We sanitize PreventInvitationsWhitelist if we need to, this is due to the fact
|
||||||
|
// that SOGo <= 2.2.17 used to store it as a JSON *string* within the JSON-blob -
|
||||||
|
// sorry about this engineering brain fart!
|
||||||
|
v = [[settings objectForKey: @"Calendar"] objectForKey: @"PreventInvitationsWhitelist"];
|
||||||
|
|
||||||
|
if (v && [v isKindOfClass: [NSString class]])
|
||||||
|
{
|
||||||
|
[[settings objectForKey: @"Calendar"] setObject: [v objectFromJSONString]
|
||||||
|
forKey: @"PreventInvitationsWhitelist"];
|
||||||
|
}
|
||||||
|
|
||||||
return [self _makeResponse: [[settings source] values]];
|
return [self _makeResponse: [[settings source] values]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue