Fix compilation warnings regarding ACLs

Also change the data structure of the JSON returned by [UIxAclEditor
aclsAction]. The user's displayName has been removed and replace by the
"cn" and "c_email" attributes. This will probably affect the Thunderbird
extensions.
This commit is contained in:
Francis Lachapelle
2014-10-31 12:59:43 -04:00
parent 9d9cf44411
commit 82873874da
6 changed files with 126 additions and 88 deletions
+11 -9
View File
@@ -1,8 +1,6 @@
/* UIxContactsUserRightsEditor.m - this file is part of SOGo
*
* Copyright (C) 2007 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Copyright (C) 2007-2014 Inverse inc.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,9 +19,12 @@
*/
#import <Foundation/NSArray.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSValue.h>
#import <NGObjWeb/WORequest.h>
#import <SoObjects/SOGo/SOGoPermissions.h>
#import "UIxContactsUserRightsEditor.h"
@@ -52,15 +53,16 @@
- (NSDictionary *) userRightsForObject
{
return [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:[self userCanCreateObjects]], @"canCreateObjects",
[NSNumber numberWithBool:[self userCanEraseObjects]], @"canEraseObjects",
[NSNumber numberWithBool:[self userCanEditObjects]], @"canEditObjects",
[NSNumber numberWithBool:[self userCanViewObjects]], @"canViewObjects", nil];
return [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:[self userCanCreateObjects]], @"canCreateObjects",
[NSNumber numberWithBool:[self userCanEraseObjects]], @"canEraseObjects",
[NSNumber numberWithBool:[self userCanEditObjects]], @"canEditObjects",
[NSNumber numberWithBool:[self userCanViewObjects]], @"canViewObjects",
nil];
}
- (void) updateRights: (NSDictionary *) newRights
{
if ([[newRights objectForKey: @"canCreateObjects"] boolValue])
[self appendRight: SOGoRole_ObjectCreator];
else
@@ -82,4 +84,4 @@
[self removeRight: SOGoRole_ObjectEraser];
}
@end
@end