oc: Empty ACL from a folder works with several users

The `[SOGoFolder:aclUsers]` returns a reference to a `NSArray`
which is being modified in the `for` loop making fail when
more than one user is in the ACL with `NSRangeException`.
pull/65/head
Enrique J. Hernández Blasco 2015-03-19 00:06:14 +01:00
parent 7bc8cd58dd
commit 8ee2303e78
1 changed files with 3 additions and 1 deletions

View File

@ -1745,10 +1745,12 @@ Class NSExceptionK, MAPIStoreFAIMessageK, MAPIStoreMessageTableK, MAPIStoreFAIMe
aclFolder = [self aclFolder];
users = [aclFolder aclUsers];
users = [[aclFolder aclUsers] copy];
max = [users count];
for (count = 0; count < max; count++)
[aclFolder removeUserFromAcls: [users objectAtIndex: count]];
[users release];
}
- (int) modifyPermissions: (struct PermissionData *) permissions