From 0cbb8ea9eb0c18561dd85d3954770efbe15ec793 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Thu, 29 Aug 2019 10:46:13 -0400 Subject: [PATCH] (fix) honor groups when setting IMAP ACLs --- NEWS | 1 + SoObjects/Mailer/SOGoMailFolder.m | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 3ed5e65de..221d7c4c9 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,7 @@ Bug fixes - [web] fixed saving value of receipt action for main IMAP account - [web] fixed search results in Calendar module when targeting all events - [core] honor IMAPLoginFieldName also when setting IMAP ACLs + - [core] honor groups when setting IMAP ACLs 4.0.8 (2019-07-19) ------------------ diff --git a/SoObjects/Mailer/SOGoMailFolder.m b/SoObjects/Mailer/SOGoMailFolder.m index bb723cc6c..f6fb77bfb 100644 --- a/SoObjects/Mailer/SOGoMailFolder.m +++ b/SoObjects/Mailer/SOGoMailFolder.m @@ -1,5 +1,5 @@ /* - Copyright (C) 2009-2017 Inverse inc. + Copyright (C) 2009-2019 Inverse inc. Copyright (C) 2004-2005 SKYRIX Software AG This file is part of SOGo. @@ -58,6 +58,7 @@ #import #import #import +#import #import #import #import @@ -1424,8 +1425,15 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data) - (NSString *) _sogoACLUIDToIMAPUID: (NSString *) uid { + SOGoGroup *group; SOGoUser *user; + group = [SOGoGroup groupWithIdentifier: uid + inDomain: [[context activeUser] domain]]; + if (group) + return [[[[context activeUser] domainDefaults] imapAclGroupIdPrefix] + stringByAppendingString: uid]; + user = [SOGoUser userWithLogin: uid]; if ([uid hasPrefix: @"@"])