See ChangeLog

Monotone-Parent: 47472b0ffbf55e9b5e6cddcaacbb75eaba65843c
Monotone-Revision: 48a1bab369727c086d0425d59fd2cf0ffc63b71c

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2011-07-05T16:39:49
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Ludovic Marcotte 2011-07-05 16:39:49 +00:00
parent 34b5360b41
commit 5b8c750f26
7 changed files with 50 additions and 4 deletions

View File

@ -8,6 +8,8 @@
* SoObjects/Appointments/SOGoAppointmentObject.m (-PUTAction:)
We check if uid is not nil prior comparing it to the
owner. This fixes bug #1323
* Added patches included in bug #1348 - which now allows
group-based ACLs for IMAP.
2011-07-02 Ludovic Marcotte <lmarcotte@inverse.ca>

1
NEWS
View File

@ -4,6 +4,7 @@ New Features
- initial support for threaded-view in the webmail interface
- sogo-tool: new "rename-user" command that automatically updates all the
references in the database after modifying a user id
- groups support for IMAP ACLs
Enhancements
- improved list selection and contextual menu behavior in all web modules

View File

@ -898,7 +898,7 @@ static NSString *defaultUserID = @"anyone";
return character;
}
- (NSString *) _sogoAclsToImapAcls: (NSArray *) sogoAcls
- (NSString *) _sogoACLsToIMAPACLs: (NSArray *) sogoAcls
{
NSMutableString *imapAcls;
NSEnumerator *acls;
@ -943,6 +943,15 @@ static NSString *defaultUserID = @"anyone";
return imapAcls;
}
- (NSString *) _sogoACLUIDToIMAPUID: (NSString *) uid
{
if ([uid hasPrefix: @"@"])
return [[[[context activeUser] domainDefaults] imapAclGroupIdPrefix]
stringByAppendingString: [uid substringFromIndex: 1]];
else
return uid;
}
- (void) _removeIMAPExtUsernames
{
NSMutableDictionary *newIMAPAcls;
@ -963,6 +972,32 @@ static NSString *defaultUserID = @"anyone";
mailboxACL = newIMAPAcls;
}
- (void) _convertIMAPGroupnames
{
NSMutableDictionary *newIMAPAcls;
NSEnumerator *usernames;
NSString *username;
NSString *newUsername;
NSString *imapPrefix;
imapPrefix = [[[context activeUser] domainDefaults] imapAclGroupIdPrefix];
newIMAPAcls = [[NSMutableDictionary alloc] init];
usernames = [[mailboxACL allKeys] objectEnumerator];
while ((username = [usernames nextObject]))
{
if ([username hasPrefix: imapPrefix])
newUsername = [@"@" stringByAppendingString: [username substringFromIndex: [imapPrefix length]]];
else
newUsername = username;
[newIMAPAcls setObject: [mailboxACL objectForKey: username]
forKey: newUsername];
}
[mailboxACL release];
mailboxACL = newIMAPAcls;
}
- (void) _readMailboxACL
{
[mailboxACL release];
@ -970,6 +1005,7 @@ static NSString *defaultUserID = @"anyone";
mailboxACL = [[self imap4Connection] aclForMailboxAtURL: [self imap4URL]];
[mailboxACL retain];
[self _convertIMAPGroupnames];
if ([[self mailAccountFolder] imapAclConformsToIMAPExt])
[self _removeIMAPExtUsernames];
}
@ -1061,7 +1097,7 @@ static NSString *defaultUserID = @"anyone";
uids = [users objectEnumerator];
while ((currentUID = [uids nextObject]))
[client deleteACL: folderName uid: currentUID];
[client deleteACL: folderName uid: [self _sogoACLUIDToIMAPUID: currentUID]];
[mailboxACL release];
mailboxACL = nil;
}
@ -1071,9 +1107,9 @@ static NSString *defaultUserID = @"anyone";
{
NSString *acls, *folderName;
acls = [self _sogoAclsToImapAcls: roles];
acls = [self _sogoACLsToIMAPACLs: roles];
folderName = [[self imap4Connection] imap4FolderNameForURL: [self imap4URL]];
[[imap4 client] setACL: folderName rights: acls uid: uid];
[[imap4 client] setACL: folderName rights: acls uid: [self _sogoACLUIDToIMAPUID: uid]];
[mailboxACL release];
mailboxACL = nil;

View File

@ -5,6 +5,7 @@
WOPidFile = "/var/run/sogo/sogo.pid";
NGImap4ConnectionStringSeparator = "/";
NGImap4ConnectionGroupIdPrefix = "$";
NGImap4DisableIMAP4Pooling = YES;
SOGoZipPath = "/usr/bin/zip";

View File

@ -43,6 +43,7 @@
- (NSString *) imapServer;
- (NSString *) sieveServer;
- (NSString *) imapAclStyle;
- (NSString *) imapAclGroupIdPrefix;
- (NSString *) imapFolderSeparator;
- (BOOL) imapAclConformsToIMAPExt;
- (BOOL) forceIMAPLoginWithEmail;

View File

@ -124,6 +124,11 @@
return [self stringForKey: @"SOGoIMAPAclStyle"];
}
- (NSString *) imapAclGroupIdPrefix
{
return [self stringForKey: @"NGImap4ConnectionGroupIdPrefix"];
}
- (NSString *) imapFolderSeparator
{
return [self stringForKey: @"NGImap4ConnectionStringSeparator"];