mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-18 19:48:53 +00:00
fix(mail): check return value of "setacl" IMAP command
This commit is contained in:
@@ -1647,13 +1647,24 @@ static NSInteger _compareFetchResultsByUID (id entry1, id entry2, NSArray *uids)
|
||||
forUser: (NSString *) uid
|
||||
{
|
||||
NSString *acls, *folderName;
|
||||
NSDictionary *result;
|
||||
|
||||
acls = [self _sogoACLsToIMAPACLs: roles];
|
||||
folderName = [[self imap4Connection] imap4FolderNameForURL: [self imap4URL]];
|
||||
[[imap4 client] setACL: folderName rights: acls uid: [self _sogoACLUIDToIMAPUID: uid]];
|
||||
result = [[imap4 client] setACL: folderName rights: acls uid: [self _sogoACLUIDToIMAPUID: uid]];
|
||||
|
||||
[mailboxACL release];
|
||||
mailboxACL = nil;
|
||||
|
||||
if (![[result valueForKey: @"result"] boolValue])
|
||||
{
|
||||
NSException *error;
|
||||
|
||||
error = [NSException exceptionWithName: @"SOGoMailException"
|
||||
reason: @"Error while setting roles"
|
||||
userInfo: (id)result];
|
||||
[error raise];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSString *) defaultUserID
|
||||
|
||||
Reference in New Issue
Block a user