See ChangeLog

Monotone-Parent: 28270e2fb73b9d6d39fb855a68f0d46bcbf364db
Monotone-Revision: 5b741965d2e2101564907ff80f19b932fae6f8d1

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2011-04-21T16:02:31
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Ludovic Marcotte 2011-04-21 16:02:31 +00:00
parent 6572fcf6ff
commit 359bc181d7
25 changed files with 154 additions and 28 deletions

View File

@ -1,3 +1,9 @@
2011-04-21 Ludovic Marcotte <lmarcotte@inverse.ca>
* Added the possibility of translating IMAP namespaces
and we now extract the full name the mailbox owner under
the "Other Users" namespace.
2011-04-21 Francis Lachapelle <flachapelle@inverse.ca>
* UI/WebServerResources/SchedulerUI.js (deleteEvent): we now show

13
NEWS
View File

@ -1,3 +1,16 @@
1.3-201004XX (1.3.6a)
---------------------
New Features
- IMAP namespaces are now translated and the full name of the
mailbox owner is extracted under "Other Users"
- added the "authenticationFilter" parameter for SQL-based
sources to limit who can authenticate to a local SOGo instance
Enhancements
Bug Fixes
1.3-20110408 (1.3.6)
--------------------
New Features

View File

@ -57,6 +57,8 @@ typedef enum {
SOGoTrashFolder *trashFolder;
SOGoIMAPAclStyle imapAclStyle;
NSMutableArray *identities;
NSString *otherUsersFolderName;
NSString *sharedFoldersName;
}
- (SOGoIMAPAclStyle) imapAclStyle;
@ -81,6 +83,8 @@ typedef enum {
- (NSString *) draftsFolderNameInContext: (id)_ctx;
- (NSString *) sentFolderNameInContext: (id)_ctx;
- (NSString *) trashFolderNameInContext: (id)_ctx;
- (NSString *) otherUsersFolderNameInContext: (id)_ctx;
- (NSString *) sharedFoldersNameInContext: (id)_ctx;
- (SOGoMailFolder *) inboxFolderInContext: (id)_ctx;
- (SOGoDraftsFolder *) draftsFolderInContext: (id)_ctx;

View File

@ -72,6 +72,8 @@ static NSString *sieveScriptName = @"sogo";
trashFolder = nil;
imapAclStyle = undefined;
identities = nil;
otherUsersFolderName = nil;
sharedFoldersName = nil;
}
return self;
@ -84,6 +86,8 @@ static NSString *sieveScriptName = @"sogo";
[sentFolder release];
[trashFolder release];
[identities release];
[otherUsersFolderName release];
[sharedFoldersName release];
[super dealloc];
}
@ -120,17 +124,33 @@ static NSString *sieveScriptName = @"sogo";
NSArray *namespace;
NGImap4Client *client;
SOGoUser *user;
NSArray *accounts;
NSDictionary *account;
user = [SOGoUser userWithLogin: [self ownerInContext: nil]];
accounts = [user mailAccounts];
account = [accounts objectAtIndex: [nameInContainer intValue]];
client = [[self imap4Connection] client];
namespaceDict = [client namespace];
namespace = [namespaceDict objectForKey: @"personal"];
if (namespace)
[self _appendNamespace: namespace toFolders: folders];
namespace = [namespaceDict objectForKey: @"other users"];
if (namespace)
[self _appendNamespace: namespace toFolders: folders];
{
[self _appendNamespace: namespace toFolders: folders];
ASSIGN(otherUsersFolderName, [folders lastObject]);
}
namespace = [namespaceDict objectForKey: @"shared"];
if (namespace)
[self _appendNamespace: namespace toFolders: folders];
{
[self _appendNamespace: namespace toFolders: folders];
ASSIGN(sharedFoldersName, [folders lastObject]);
}
}
- (NSArray *) _namespacesWithKey: (NSString *) nsKey
@ -788,6 +808,16 @@ static NSString *sieveScriptName = @"sogo";
return [self _userFolderNameWithPurpose: @"Trash"];
}
- (NSString *) otherUsersFolderNameInContext: (id)_ctx
{
return otherUsersFolderName;
}
- (NSString *) sharedFoldersNameInContext: (id)_ctx
{
return sharedFoldersName;
}
- (id) folderWithTraversal: (NSString *) traversal
andClassName: (NSString *) className
{

View File

@ -1,6 +1,6 @@
/* SOGoUserSettings.m - this file is part of SOGo
*
* Copyright (C) 2009 Inverse inc.
* Copyright (C) 2009-2010 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*

View File

@ -165,6 +165,8 @@
"InboxFolderName" = "Entrada";
"DraftsFolderName" = "Rascunhos";
"SieveFolderName" = "Filtros";
"OtherUsersFolderName" = "Other Users";
"SharedFoldersName" = "Shared Folders";
"Folders" = "Pastas"; /* title line */
/* MailMoveToPopUp */
@ -286,4 +288,4 @@
/* Message sending */
"cannot send message: (smtp) all recipients discarded" = "Cannot send message: all recipients are invalid.";
"cannot send message (smtp) - recipients discarded:" = "Cannot send message. The following addresses are invalid:";
"cannot send message: (smtp) error when connecting" = "Cannot send message: error when connecting to the SMTP server.";
"cannot send message: (smtp) error when connecting" = "Cannot send message: error when connecting to the SMTP server.";

View File

@ -165,6 +165,8 @@
"InboxFolderName" = "Safata d'entrada";
"DraftsFolderName" = "Esborranys";
"SieveFolderName" = "Filtres";
"OtherUsersFolderName" = "Other Users";
"SharedFoldersName" = "Shared Folders";
"Folders" = "Carpetes"; /* title line */
/* MailMoveToPopUp */
@ -286,4 +288,4 @@
/* Message sending */
"cannot send message: (smtp) all recipients discarded" = "Cannot send message: all recipients are invalid.";
"cannot send message (smtp) - recipients discarded:" = "Cannot send message. The following addresses are invalid:";
"cannot send message: (smtp) error when connecting" = "Cannot send message: error when connecting to the SMTP server.";
"cannot send message: (smtp) error when connecting" = "Cannot send message: error when connecting to the SMTP server.";

View File

@ -165,6 +165,8 @@
"InboxFolderName" = "Doručená pošta";
"DraftsFolderName" = "Koncepty";
"SieveFolderName" = "Filtry";
"OtherUsersFolderName" = "Ostatní uživatelé";
"SharedFoldersName" = "Sdílené složky";
"Folders" = "Složky"; /* title line */
/* MailMoveToPopUp */
@ -286,4 +288,4 @@
/* Message sending */
"cannot send message: (smtp) all recipients discarded" = "Cannot send message: all recipients are invalid.";
"cannot send message (smtp) - recipients discarded:" = "Cannot send message. The following addresses are invalid:";
"cannot send message: (smtp) error when connecting" = "Cannot send message: error when connecting to the SMTP server.";
"cannot send message: (smtp) error when connecting" = "Cannot send message: error when connecting to the SMTP server.";

View File

@ -165,6 +165,8 @@
"InboxFolderName" = "Postvak IN";
"DraftsFolderName" = "Concepten";
"SieveFolderName" = "Berichtregel";
"OtherUsersFolderName" = "Other Users";
"SharedFoldersName" = "Shared Folders";
"Folders" = "Mappen"; /* title line */
/* MailMoveToPopUp */
@ -286,4 +288,4 @@
/* Message sending */
"cannot send message: (smtp) all recipients discarded" = "Cannot send message: all recipients are invalid.";
"cannot send message (smtp) - recipients discarded:" = "Cannot send message. The following addresses are invalid:";
"cannot send message: (smtp) error when connecting" = "Cannot send message: error when connecting to the SMTP server.";
"cannot send message: (smtp) error when connecting" = "Cannot send message: error when connecting to the SMTP server.";

View File

@ -165,6 +165,8 @@
"InboxFolderName" = "Inbox";
"DraftsFolderName" = "Drafts";
"SieveFolderName" = "Filters";
"OtherUsersFolderName" = "Other Users";
"SharedFoldersName" = "Shared Folders";
"Folders" = "Folders"; /* title line */
/* MailMoveToPopUp */
@ -286,4 +288,4 @@
/* Message sending */
"cannot send message: (smtp) all recipients discarded" = "Cannot send message: all recipients are invalid.";
"cannot send message (smtp) - recipients discarded:" = "Cannot send message. The following addresses are invalid:";
"cannot send message: (smtp) error when connecting" = "Cannot send message: error when connecting to the SMTP server.";
"cannot send message: (smtp) error when connecting" = "Cannot send message: error when connecting to the SMTP server.";

View File

@ -165,6 +165,8 @@
"InboxFolderName" = "Courrier entrant";
"DraftsFolderName" = "Brouillons";
"SieveFolderName" = "Filtres";
"OtherUsersFolderName" = "Autres utilisateurs";
"SharedFoldersName" = "Dossiers partagés";
"Folders" = "Dossiers"; /* title line */
/* MailMoveToPopUp */

View File

@ -165,6 +165,8 @@
"InboxFolderName" = "Posteingang";
"DraftsFolderName" = "Entwürfe";
"SieveFolderName" = "Filter";
"OtherUsersFolderName" = "Other Users";
"SharedFoldersName" = "Shared Folders";
"Folders" = "Ordner"; /* title line */
/* MailMoveToPopUp */

View File

@ -165,6 +165,8 @@
"InboxFolderName" = "Beérkezett üzenetek";
"DraftsFolderName" = "Piszkozatok";
"SieveFolderName" = "Szűrők";
"OtherUsersFolderName" = "Egyéb felhasználók";
"SharedFoldersName" = "Megosztott mappák";
"Folders" = "Mappák"; /* title line */
/* MailMoveToPopUp */
@ -286,4 +288,4 @@
/* Message sending */
"cannot send message: (smtp) all recipients discarded" = "Cannot send message: all recipients are invalid.";
"cannot send message (smtp) - recipients discarded:" = "Cannot send message. The following addresses are invalid:";
"cannot send message: (smtp) error when connecting" = "Cannot send message: error when connecting to the SMTP server.";
"cannot send message: (smtp) error when connecting" = "Cannot send message: error when connecting to the SMTP server.";

View File

@ -165,6 +165,8 @@
"InboxFolderName" = "Posta in arrivo";
"DraftsFolderName" = "Bozze";
"SieveFolderName" = "Filtri";
"OtherUsersFolderName" = "Altri Utenti";
"SharedFoldersName" = "Cartelle Condivise";
"Folders" = "Cartelle"; /* title line */
/* MailMoveToPopUp */

View File

@ -165,6 +165,8 @@
"InboxFolderName" = "Innboks";
"DraftsFolderName" = "Kladder";
"SieveFolderName" = "Filter";
"OtherUsersFolderName" = "Other Users";
"SharedFoldersName" = "Shared Folders";
"Folders" = "Mapper"; /* title line */
/* MailMoveToPopUp */

View File

@ -165,6 +165,8 @@
"InboxFolderName" = "Odebrane";
"DraftsFolderName" = "Szkice";
"SieveFolderName" = "Filtry";
"OtherUsersFolderName" = "Other Users";
"SharedFoldersName" = "Shared Folders";
"Folders" = "Foldery"; /* title line */
/* MailMoveToPopUp */
@ -286,4 +288,4 @@
/* Message sending */
"cannot send message: (smtp) all recipients discarded" = "Cannot send message: all recipients are invalid.";
"cannot send message (smtp) - recipients discarded:" = "Cannot send message. The following addresses are invalid:";
"cannot send message: (smtp) error when connecting" = "Cannot send message: error when connecting to the SMTP server.";
"cannot send message: (smtp) error when connecting" = "Cannot send message: error when connecting to the SMTP server.";

View File

@ -165,6 +165,8 @@
"InboxFolderName" = "Входящие";
"DraftsFolderName" = "Черновики";
"SieveFolderName" = "Папки";
"OtherUsersFolderName" = "Другие пользователи";
"SharedFoldersName" = "Общие папки";
"Folders" = "Папки"; /* title line */
/* MailMoveToPopUp */
@ -286,4 +288,4 @@
/* Message sending */
"cannot send message: (smtp) all recipients discarded" = "Cannot send message: all recipients are invalid.";
"cannot send message (smtp) - recipients discarded:" = "Cannot send message. The following addresses are invalid:";
"cannot send message: (smtp) error when connecting" = "Cannot send message: error when connecting to the SMTP server.";
"cannot send message: (smtp) error when connecting" = "Cannot send message: error when connecting to the SMTP server.";

View File

@ -165,6 +165,8 @@
"InboxFolderName" = "Bandeja de entrada";
"DraftsFolderName" = "Borradores";
"SieveFolderName" = "Filtros";
"OtherUsersFolderName" = "Other Users";
"SharedFoldersName" = "Shared Folders";
"Folders" = "Carpetas"; /* title line */
/* MailMoveToPopUp */
@ -286,4 +288,4 @@
/* Message sending */
"cannot send message: (smtp) all recipients discarded" = "No se puede enviar el mensaje: (smtp) todos los destinatarios han sido descartados";
"cannot send message (smtp) - recipients discarded:" = "No se puede enviar el mensaje: (smtp) destinatarios descartados:";
"cannot send message: (smtp) error when connecting" = "No se puede enviar el mensaje: (smtp) error de conexión";
"cannot send message: (smtp) error when connecting" = "No se puede enviar el mensaje: (smtp) error de conexión";

View File

@ -165,6 +165,8 @@
"InboxFolderName" = "Inkorgen";
"DraftsFolderName" = "Utkast";
"SieveFolderName" = "Filter";
"OtherUsersFolderName" = "Other Users";
"SharedFoldersName" = "Shared Folders";
"Folders" = "Mappar"; /* title line */
/* MailMoveToPopUp */

View File

@ -1,6 +1,6 @@
/* UIxMailAccountActions.h - this file is part of SOGo
*
* Copyright (C) 2007 Inverse inc.
* Copyright (C) 2007-2011 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
@ -33,6 +33,8 @@
NSString *draftsFolderName;
NSString *sentFolderName;
NSString *trashFolderName;
NSString *otherUsersFolderName;
NSString *sharedFoldersName;
}
- (WOResponse *) listMailboxesAction;

View File

@ -1,6 +1,6 @@
/* UIxMailAccountActions.m - this file is part of SOGo
*
* Copyright (C) 2007, 2011 Inverse inc.
* Copyright (C) 2007-2011 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
@ -40,6 +40,7 @@
#import <SOGo/NSString+Utilities.h>
#import <SOGo/SOGoDomainDefaults.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserManager.h>
#import "../Common/WODirectAction+SOGo.h"
@ -55,6 +56,8 @@
draftsFolderName = nil;
sentFolderName = nil;
trashFolderName = nil;
otherUsersFolderName = nil;
sharedFoldersName = nil;
}
return self;
@ -66,6 +69,8 @@
[draftsFolderName release];
[sentFolderName release];
[trashFolderName release];
[otherUsersFolderName release];
[sharedFoldersName release];
[super dealloc];
}
@ -83,11 +88,15 @@
[co draftsFolderNameInContext: context],
[co sentFolderNameInContext: context],
[co trashFolderNameInContext: context],
[co otherUsersFolderNameInContext: context],
[co sharedFoldersNameInContext: context],
nil] stringsWithFormat: @"/%@"];
ASSIGN (inboxFolderName, [specialFolders objectAtIndex: 0]);
ASSIGN (draftsFolderName, [specialFolders objectAtIndex: 1]);
ASSIGN (sentFolderName, [specialFolders objectAtIndex: 2]);
ASSIGN (trashFolderName, [specialFolders objectAtIndex: 3]);
ASSIGN(inboxFolderName, [specialFolders objectAtIndex: 0]);
ASSIGN(draftsFolderName, [specialFolders objectAtIndex: 1]);
ASSIGN(sentFolderName, [specialFolders objectAtIndex: 2]);
ASSIGN(trashFolderName, [specialFolders objectAtIndex: 3]);
ASSIGN(otherUsersFolderName, [specialFolders objectAtIndex: 4]);
ASSIGN(sharedFoldersName, [specialFolders objectAtIndex: 5]);
}
if ([folderName isEqualToString: inboxFolderName])
@ -106,17 +115,45 @@
- (NSArray *) _jsonFolders: (NSEnumerator *) rawFolders
{
NSMutableArray *folders;
NSString *currentFolder;
NSString *currentFolder, *currentDisplayName, *currentFolderType, *login;
NSMutableArray *pathComponents;
SOGoUserManager *userManager;
NSDictionary *folderData;
NSMutableArray *folders;
folders = [NSMutableArray array];
while ((currentFolder = [rawFolders nextObject]))
{
currentFolderType = [self _folderType: currentFolder];
// We translate the "Other Users" and "Shared Folders" namespaces.
// While we're at it, we also translate the user's mailbox names
// to the full name of the person.
if ([currentFolder hasPrefix: otherUsersFolderName])
{
// We have a string like /Other Users/lmarcotte/...
pathComponents = [NSMutableArray arrayWithArray: [currentFolder pathComponents]];
login = [pathComponents objectAtIndex: 2];
userManager = [SOGoUserManager sharedUserManager];
[pathComponents removeObjectsInRange: NSMakeRange(0,1)];
currentDisplayName = [NSString stringWithFormat: @"/%@/%@/%@",
[self labelForKey: @"OtherUsersFolderName"],
[userManager getCNForUID: login],
[pathComponents componentsJoinedByString: @"/"]];
}
else if ([currentFolder hasPrefix: sharedFoldersName])
currentDisplayName = [NSString stringWithFormat: @"/%@%@", [self labelForKey: @"SharedFoldersName"],
[currentFolder substringFromIndex: [sharedFoldersName length]]];
else
currentDisplayName = currentFolder;
folderData = [NSDictionary dictionaryWithObjectsAndKeys:
currentFolder, @"path",
[self _folderType: currentFolder], @"type",
nil];
currentFolderType, @"type",
currentDisplayName, @"displayName",
nil];
[folders addObject: folderData];
}

View File

@ -1,5 +1,5 @@
/*
Copyright (C) 2007-2010 Inverse inc.
Copyright (C) 2007-2011 Inverse inc.
Copyright (C) 2004-2005 SKYRIX Software AG
This file is part of SOGo.

View File

@ -165,6 +165,8 @@
"InboxFolderName" = "Вхідні";
"DraftsFolderName" = "Чернетки";
"SieveFolderName" = "Теки";
"OtherUsersFolderName" = "Інші користувачі";
"SharedFoldersName" = "Спільні теки";
"Folders" = "Всі теки"; /* title line */
/* MailMoveToPopUp */
@ -286,4 +288,4 @@
/* Message sending */
"cannot send message: (smtp) all recipients discarded" = "Помилка під час відправлення повідомлення: некоректні адреси всіх отримувачів.";
"cannot send message (smtp) - recipients discarded:" = "Помила під час відправлення повідомлення: такі адреси некоректні:";
"cannot send message: (smtp) error when connecting" = "Помилка під час відправлення повідомлення: SMTP-сервер не відповідає.";
"cannot send message: (smtp) error when connecting" = "Помилка під час відправлення повідомлення: SMTP-сервер не відповідає.";

View File

@ -165,6 +165,8 @@
"InboxFolderName" = "Newydd";
"DraftsFolderName" = "Draffts";
"SieveFolderName" = "Ffilteri";
"OtherUsersFolderName" = "Other Users";
"SharedFoldersName" = "Shared Folders";
"Folders" = "Ffolderi"; /* title line */
/* MailMoveToPopUp */
@ -286,4 +288,4 @@
/* Message sending */
"cannot send message: (smtp) all recipients discarded" = "Cannot send message: all recipients are invalid.";
"cannot send message (smtp) - recipients discarded:" = "Cannot send message. The following addresses are invalid:";
"cannot send message: (smtp) error when connecting" = "Cannot send message: error when connecting to the SMTP server.";
"cannot send message: (smtp) error when connecting" = "Cannot send message: error when connecting to the SMTP server.";

View File

@ -2136,11 +2136,13 @@ function buildMailboxes(accountIdx, encoded) {
for (var i = 0; i < mailboxes.length; i++) {
var currentNode = account;
var names = mailboxes[i].path.split("/");
var displayNames = mailboxes[i].displayName.split("/");
for (var j = 1; j < (names.length - 1); j++) {
var name = names[j];
var node = currentNode.findMailboxByName(name);
if (!node) {
node = new Mailbox("additional", name);
node = new Mailbox("additional", name, 0, displayNames[j]);
currentNode.addMailbox(node);
}
currentNode = node;
@ -2151,9 +2153,9 @@ function buildMailboxes(accountIdx, encoded) {
leaf.type = mailboxes[i].type;
else {
if (mailboxes[i].type == 'inbox')
leaf = new Mailbox(mailboxes[i].type, basename, unseen);
leaf = new Mailbox(mailboxes[i].type, basename, unseen, displayNames[names.length-1]);
else
leaf = new Mailbox(mailboxes[i].type, basename);
leaf = new Mailbox(mailboxes[i].type, basename, 0, displayNames[names.length-1]);
currentNode.addMailbox(leaf);
}
}