Compare commits
22
Commits
test_pr359
...
fix-5917
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a4ffa1fce | ||
|
|
594b0249c3 | ||
|
|
64f17880c7 | ||
|
|
59d48cb382 | ||
|
|
2da4aa8cb8 | ||
|
|
1c20c1ead3 | ||
|
|
a7023bce16 | ||
|
|
84fe91c29c | ||
|
|
68f4fc1343 | ||
|
|
2a1744998c | ||
|
|
01607b151d | ||
|
|
0cbd082c1d | ||
|
|
41a0f8d9af | ||
|
|
2dd10970a4 | ||
|
|
2f75a7fb1b | ||
|
|
c1e4dc5a0e | ||
|
|
fa2caf9026 | ||
|
|
f42f94da84 | ||
|
|
1f6bbc1044 | ||
|
|
a24d59dfaf | ||
|
|
91a249009b | ||
|
|
16f371dba7 |
No files matched your search
+146
-144
@@ -454,19 +454,22 @@ static NSString *inboxFolderName = @"INBOX";
|
||||
//
|
||||
- (NSString *) _folderType: (NSString *) folderName
|
||||
flags: (NSMutableArray *) flags
|
||||
folderTypes: (NSDictionary *) folderTypes
|
||||
{
|
||||
static NSDictionary *metadata = nil;
|
||||
NSString *folderType, *key, *rights;
|
||||
static NSDictionary *folderTypeDict = nil;
|
||||
NSString *folderType, *key, *rights, *flag;
|
||||
NSEnumerator *flagEnum;
|
||||
SOGoUserDefaults *ud;
|
||||
|
||||
if (!metadata)
|
||||
{
|
||||
ud = [[context activeUser] userDefaults];
|
||||
metadata = [[[self imap4Connection] allFoldersMetadataForURL: [self imap4URL]
|
||||
onlySubscribedFolders: [ud mailShowSubscribedFoldersOnly]]
|
||||
objectForKey: @"list"];
|
||||
[metadata retain];
|
||||
}
|
||||
{
|
||||
ud = [[context activeUser] userDefaults];
|
||||
metadata = [[[self imap4Connection] allFoldersMetadataForURL: [self imap4URL]
|
||||
onlySubscribedFolders: [ud mailShowSubscribedFoldersOnly]]
|
||||
objectForKey: @"list"];
|
||||
[metadata retain];
|
||||
}
|
||||
|
||||
key = [NSString stringWithFormat: @"/%@", folderName];
|
||||
[flags addObjectsFromArray: [metadata objectForKey: key]];
|
||||
@@ -474,44 +477,32 @@ static NSString *inboxFolderName = @"INBOX";
|
||||
// RFC6154 (https://tools.ietf.org/html/rfc6154) describes special uses for IMAP mailboxes.
|
||||
// We do honor them, as long as your SOGo{Drafts,Trash,Sent,Junk}FolderName are properly configured
|
||||
// See http://wiki.dovecot.org/MailboxSettings for a Dovecot example.
|
||||
if ([folderName isEqualToString: inboxFolderName])
|
||||
folderType = @"inbox";
|
||||
else if ([flags containsObject: [self draftsFolderNameInContext: context]] ||
|
||||
[folderName isEqualToString: [self draftsFolderNameInContext: context]])
|
||||
folderType = @"draft";
|
||||
else if ([flags containsObject: [self sentFolderNameInContext: context]] ||
|
||||
[folderName isEqualToString: [self sentFolderNameInContext: context]])
|
||||
folderType = @"sent";
|
||||
else if ([flags containsObject: [self trashFolderNameInContext: context]] ||
|
||||
[folderName isEqualToString: [self trashFolderNameInContext: context]])
|
||||
folderType = @"trash";
|
||||
else if ([flags containsObject: [self junkFolderNameInContext: context]] ||
|
||||
[folderName isEqualToString: [self junkFolderNameInContext: context]])
|
||||
folderType = @"junk";
|
||||
else if ([flags containsObject: [self templatesFolderNameInContext: context]] ||
|
||||
[folderName isEqualToString: [self templatesFolderNameInContext: context]])
|
||||
folderType = @"templates";
|
||||
else if ([folderName isEqualToString: otherUsersFolderName])
|
||||
folderType = @"otherUsers";
|
||||
else if ([folderName isEqualToString: sharedFoldersName])
|
||||
folderType = @"shared";
|
||||
else
|
||||
if((folderType = [folderTypes objectForKey: folderName]))
|
||||
return folderType;
|
||||
|
||||
flagEnum = [flags objectEnumerator];
|
||||
while((flag = [flagEnum nextObject]))
|
||||
{
|
||||
if([flag isEqualToString: inboxFolderName] || [flag isEqualToString: otherUsersFolderName] || [flag isEqualToString: sharedFoldersName])
|
||||
continue;
|
||||
if((folderType = [folderTypes objectForKey: flag]))
|
||||
return folderType;
|
||||
}
|
||||
|
||||
folderType = @"folder";
|
||||
if (([sharedFoldersName length] && [folderName hasPrefix: sharedFoldersName]) ||
|
||||
([otherUsersFolderName length] && [folderName hasPrefix: otherUsersFolderName]))
|
||||
{
|
||||
rights = [[self imap4Connection] myRightsForMailboxAtURL: [NSURL URLWithString: folderName]];
|
||||
if (![rights isKindOfClass: [NSException class]] &&
|
||||
([rights rangeOfString: @"r"].location == NSNotFound))
|
||||
{
|
||||
folderType = @"folder";
|
||||
if (([sharedFoldersName length] && [folderName hasPrefix: sharedFoldersName]) ||
|
||||
([otherUsersFolderName length] && [folderName hasPrefix: otherUsersFolderName]))
|
||||
{
|
||||
rights = [[self imap4Connection] myRightsForMailboxAtURL: [NSURL URLWithString: folderName]];
|
||||
if (![rights isKindOfClass: [NSException class]] &&
|
||||
([rights rangeOfString: @"r"].location == NSNotFound))
|
||||
{
|
||||
[flags addObjectUniquely: @"noselect"];
|
||||
if ([rights rangeOfString: @"i"].location != NSNotFound)
|
||||
// No read but insert = dropbox
|
||||
folderType = @"dropbox";
|
||||
}
|
||||
}
|
||||
[flags addObjectUniquely: @"noselect"];
|
||||
if ([rights rangeOfString: @"i"].location != NSNotFound)
|
||||
// No read but insert = dropbox
|
||||
folderType = @"dropbox";
|
||||
}
|
||||
}
|
||||
|
||||
return folderType;
|
||||
}
|
||||
@@ -521,6 +512,7 @@ static NSString *inboxFolderName = @"INBOX";
|
||||
//
|
||||
- (NSMutableDictionary *) _insertFolder: (NSString *) folderPath
|
||||
foldersList: (NSMutableArray *) theFolders
|
||||
folderTypes: (NSDictionary *) folderTypes
|
||||
{
|
||||
NSArray *pathComponents;
|
||||
NSMutableArray *folders, *flags;
|
||||
@@ -541,103 +533,99 @@ static NSString *inboxFolderName = @"INBOX";
|
||||
// The variable folderPath is something like '/INBOX/Junk' so pathComponents becomes ('/', 'INBOX', 'Junk').
|
||||
// That's why we always ignore the first element
|
||||
for (i = 1; i < count; i++)
|
||||
{
|
||||
last = ((count - i) == 1);
|
||||
folder = nil;
|
||||
if ([currentPath length])
|
||||
currentPath = [NSString stringWithFormat: @"%@/%@", currentPath, [pathComponents objectAtIndex: i]];
|
||||
else
|
||||
currentPath = [pathComponents objectAtIndex: i];
|
||||
|
||||
// Search for the current path in the children of the parent folder.
|
||||
// For the first iteration, take the parent folder passed as argument.
|
||||
if (parentFolder)
|
||||
folders = [parentFolder objectForKey: @"children"];
|
||||
else
|
||||
folders = theFolders;
|
||||
|
||||
for (j = 0; j < [folders count]; j++)
|
||||
{
|
||||
last = ((count - i) == 1);
|
||||
folder = nil;
|
||||
if ([currentPath length])
|
||||
currentPath = [NSString stringWithFormat: @"%@/%@", currentPath, [pathComponents objectAtIndex: i]];
|
||||
else
|
||||
currentPath = [pathComponents objectAtIndex: i];
|
||||
|
||||
// Search for the current path in the children of the parent folder.
|
||||
// For the first iteration, take the parent folder passed as argument.
|
||||
if (parentFolder)
|
||||
folders = [parentFolder objectForKey: @"children"];
|
||||
else
|
||||
folders = theFolders;
|
||||
|
||||
for (j = 0; j < [folders count]; j++)
|
||||
{
|
||||
currentFolder = [folders objectAtIndex: j];
|
||||
if ([currentPath isEqualToString: [currentFolder objectForKey: @"path"]])
|
||||
{
|
||||
folder = currentFolder;
|
||||
// Make sure all branches are ready to receive children
|
||||
if (!last && ![folder objectForKey: @"children"])
|
||||
[folder setObject: [NSMutableArray array] forKey: @"children"];
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the current folder is the "Other users" folder (shared mailboxes)
|
||||
currentFolderName = [[pathComponents objectAtIndex: i] stringByDecodingImap4FolderName];
|
||||
if (otherUsersFolderName
|
||||
&& [currentFolderName caseInsensitiveCompare: otherUsersFolderName] == NSOrderedSame)
|
||||
isOtherUsersFolder = YES;
|
||||
else
|
||||
isOtherUsersFolder = NO;
|
||||
|
||||
if (folder == nil)
|
||||
{
|
||||
// Folder was not found; create it and add it to the folders list
|
||||
if (parentIsOtherUsersFolder)
|
||||
{
|
||||
// Parent folder is the "Other users" folder; translate the user's mailbox name
|
||||
// to the full name of the person
|
||||
userManager = [SOGoUserManager sharedUserManager];
|
||||
if ((fullName = [userManager getCNForUID: currentFolderName]) && [fullName length])
|
||||
currentFolderName = fullName;
|
||||
else if ((fullName = [userManager getEmailForUID: currentFolderName]) && [fullName length])
|
||||
currentFolderName = fullName;
|
||||
}
|
||||
else if (isOtherUsersFolder)
|
||||
currentFolderName = [self labelForKey: @"OtherUsersFolderName"];
|
||||
else if (sharedFoldersName
|
||||
&& [currentFolderName caseInsensitiveCompare: sharedFoldersName] == NSOrderedSame)
|
||||
currentFolderName = [self labelForKey: @"SharedFoldersName"];
|
||||
|
||||
flags = [NSMutableArray array];
|
||||
|
||||
if (last)
|
||||
{
|
||||
folderType = [self _folderType: currentPath
|
||||
flags: flags];
|
||||
}
|
||||
else
|
||||
{
|
||||
folderType = @"additional";
|
||||
[flags addObject: @"noselect"];
|
||||
}
|
||||
|
||||
if ([subscribedFolders objectForKey: folderPath])
|
||||
isSubscribed = YES;
|
||||
else
|
||||
isSubscribed = NO;
|
||||
|
||||
folder = [NSMutableDictionary dictionaryWithObjectsAndKeys:
|
||||
currentPath, @"path",
|
||||
folderType, @"type",
|
||||
currentFolderName, @"name",
|
||||
[NSMutableArray array], @"children",
|
||||
flags, @"flags",
|
||||
[NSNumber numberWithBool: isSubscribed], @"subscribed",
|
||||
nil];
|
||||
|
||||
if (sieveFolderUTF8Encoding)
|
||||
sievePath = [currentPath stringByDecodingImap4FolderName];
|
||||
else
|
||||
sievePath = currentPath;
|
||||
[folder setObject: sievePath forKey: @"sievePath"];
|
||||
|
||||
// Either add this new folder to its parent or the list of root folders
|
||||
[folders addObject: folder];
|
||||
}
|
||||
|
||||
parentFolder = folder;
|
||||
parentIsOtherUsersFolder = isOtherUsersFolder;
|
||||
currentFolder = [folders objectAtIndex: j];
|
||||
if ([currentPath isEqualToString: [currentFolder objectForKey: @"path"]])
|
||||
{
|
||||
folder = currentFolder;
|
||||
// Make sure all branches are ready to receive children
|
||||
if (!last && ![folder objectForKey: @"children"])
|
||||
[folder setObject: [NSMutableArray array] forKey: @"children"];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the current folder is the "Other users" folder (shared mailboxes)
|
||||
currentFolderName = [[pathComponents objectAtIndex: i] stringByDecodingImap4FolderName];
|
||||
if (otherUsersFolderName && [currentFolderName caseInsensitiveCompare: otherUsersFolderName] == NSOrderedSame)
|
||||
isOtherUsersFolder = YES;
|
||||
else
|
||||
isOtherUsersFolder = NO;
|
||||
|
||||
if (folder == nil)
|
||||
{
|
||||
// Folder was not found; create it and add it to the folders list
|
||||
if (parentIsOtherUsersFolder)
|
||||
{
|
||||
// Parent folder is the "Other users" folder; translate the user's mailbox name
|
||||
// to the full name of the person
|
||||
userManager = [SOGoUserManager sharedUserManager];
|
||||
if ((fullName = [userManager getCNForUID: currentFolderName]) && [fullName length])
|
||||
currentFolderName = fullName;
|
||||
else if ((fullName = [userManager getEmailForUID: currentFolderName]) && [fullName length])
|
||||
currentFolderName = fullName;
|
||||
}
|
||||
else if (isOtherUsersFolder)
|
||||
currentFolderName = [self labelForKey: @"OtherUsersFolderName"];
|
||||
else if (sharedFoldersName && [currentFolderName caseInsensitiveCompare: sharedFoldersName] == NSOrderedSame)
|
||||
currentFolderName = [self labelForKey: @"SharedFoldersName"];
|
||||
|
||||
flags = [NSMutableArray array];
|
||||
|
||||
if (last)
|
||||
{
|
||||
folderType = [self _folderType: currentPath flags: flags folderTypes: folderTypes];
|
||||
}
|
||||
else
|
||||
{
|
||||
folderType = @"additional";
|
||||
[flags addObject: @"noselect"];
|
||||
}
|
||||
|
||||
if ([subscribedFolders objectForKey: folderPath])
|
||||
isSubscribed = YES;
|
||||
else
|
||||
isSubscribed = NO;
|
||||
|
||||
folder = [NSMutableDictionary dictionaryWithObjectsAndKeys:
|
||||
currentPath, @"path",
|
||||
folderType, @"type",
|
||||
currentFolderName, @"name",
|
||||
[NSMutableArray array], @"children",
|
||||
flags, @"flags",
|
||||
[NSNumber numberWithBool: isSubscribed], @"subscribed",
|
||||
nil];
|
||||
|
||||
if (sieveFolderUTF8Encoding)
|
||||
sievePath = [currentPath stringByDecodingImap4FolderName];
|
||||
else
|
||||
sievePath = currentPath;
|
||||
[folder setObject: sievePath forKey: @"sievePath"];
|
||||
|
||||
// Either add this new folder to its parent or the list of root folders
|
||||
[folders addObject: folder];
|
||||
}
|
||||
|
||||
parentFolder = folder;
|
||||
parentIsOtherUsersFolder = isOtherUsersFolder;
|
||||
}
|
||||
|
||||
return parentFolder;
|
||||
}
|
||||
|
||||
@@ -651,11 +639,25 @@ static NSString *inboxFolderName = @"INBOX";
|
||||
NSEnumerator *rawFolders;
|
||||
NSAutoreleasePool *pool;
|
||||
NSArray *allFolderPaths;
|
||||
NSMutableDictionary *folderTypes;
|
||||
|
||||
allFolderPaths = [self allFolderPaths: theListingMode];
|
||||
rawFolders = [allFolderPaths objectEnumerator];
|
||||
folders = [NSMutableArray array];
|
||||
|
||||
folderTypes = [NSMutableDictionary dictionaryWithObjectsAndKeys:
|
||||
@"inbox", inboxFolderName,
|
||||
@"draft", [self draftsFolderNameInContext: context],
|
||||
@"sent", [self sentFolderNameInContext: context],
|
||||
@"trash", [self trashFolderNameInContext: context],
|
||||
@"junk", [self junkFolderNameInContext: context],
|
||||
@"templates", [self templatesFolderNameInContext: context],
|
||||
nil];
|
||||
if(otherUsersFolderName && [otherUsersFolderName length] > 0)
|
||||
[folderTypes setObject: @"otherUsers" forKey: otherUsersFolderName];
|
||||
if(sharedFoldersName && [sharedFoldersName length] > 0)
|
||||
[folderTypes setObject: @"shared" forKey: sharedFoldersName];
|
||||
|
||||
while ((currentFolder = [rawFolders nextObject]))
|
||||
{
|
||||
// Using a local pool to avoid using too many file descriptors. This could
|
||||
@@ -666,7 +668,8 @@ static NSString *inboxFolderName = @"INBOX";
|
||||
|
||||
// Insert folder into folders tree
|
||||
[self _insertFolder: currentFolder
|
||||
foldersList: folders];
|
||||
foldersList: folders
|
||||
folderTypes: folderTypes];
|
||||
|
||||
[pool release];
|
||||
}
|
||||
@@ -1119,11 +1122,10 @@ static NSString *inboxFolderName = @"INBOX";
|
||||
folderName = [[account objectForKey: @"specialMailboxes"]
|
||||
objectForKey: purpose];
|
||||
if (!folderName && accountIdx > 0)
|
||||
{
|
||||
account = [accounts objectAtIndex: 0];
|
||||
folderName = [[account objectForKey: @"specialMailboxes"]
|
||||
objectForKey: purpose];
|
||||
}
|
||||
{
|
||||
account = [accounts objectAtIndex: 0];
|
||||
folderName = [[account objectForKey: @"specialMailboxes"] objectForKey: purpose];
|
||||
}
|
||||
|
||||
return folderName;
|
||||
}
|
||||
|
||||
@@ -1243,12 +1243,10 @@ static NSString *sieveScriptName = @"sogo";
|
||||
if (v && [v length] > 0)
|
||||
{
|
||||
notify = @"if header :matches \"subject\" \"*\" {\r\n set \"subject\" \"${1}\";\r\n}\r\n";
|
||||
notify = [notify stringByAppendingString: @"if header :matches \"From\" \"*<*>\" {\r\n set \"from\" \"${1} ${2}\";\r\n}\r\n"];
|
||||
notify = [notify stringByAppendingFormat: @"set :encodeurl \"body_param\" \"%@\";\r\n", message];
|
||||
notify = [notify stringByAppendingFormat: @"notify :message \"%@: ${subject}\" \"mailto:%@?body=${body_param}\";\r\n", notificationTranslated, v];
|
||||
notify = [notify stringByAppendingFormat: @"notify :message \"%@: '${subject}' from: ${from}\" \"mailto:%@?body=${body_param}\";\r\n", notificationTranslated, v];
|
||||
|
||||
// if (alwaysSend)
|
||||
// [script insertString: notify atIndex: 0];
|
||||
// else
|
||||
[script appendString: notify];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,4 +267,8 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
- (NSString *)applicationName {
|
||||
return @"SOGo";
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -13,6 +13,10 @@ let utility, user, attendee1, attendee1Delegate
|
||||
let userCalendar, attendee1Calendar, attendee1DelegateCalendar
|
||||
let icsName, icsList, vcalendar
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
describe('PreventInvitations', function() {
|
||||
|
||||
const _getEvent = async function(client, calendarName, filename, expectedCode = 200) {
|
||||
|
||||
@@ -2,6 +2,10 @@ import config from '../lib/config'
|
||||
import WebDAV from '../lib/WebDAV'
|
||||
import TestUtility from '../lib/utilities'
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
describe('read and set calendar properties', function() {
|
||||
const webdav = new WebDAV(config.username, config.password)
|
||||
const utility = new TestUtility(webdav)
|
||||
|
||||
@@ -3,6 +3,10 @@ import WebDAV from '../lib/WebDAV'
|
||||
import TestUtility from '../lib/utilities'
|
||||
import ICAL from 'ical.js'
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
describe('CalDAV Scheduling', function() {
|
||||
const webdav = new WebDAV(config.username, config.password)
|
||||
const webdav_su = new WebDAV(config.superuser, config.superuser_password)
|
||||
@@ -933,5 +937,5 @@ describe('CalDAV Scheduling', function() {
|
||||
|
||||
vcalendarInvitationAttendee = await _getEvent(webdavAttendee1, attendee1Calendar, icsName, 404)
|
||||
vcalendarInvitationDelegate = await _getEvent(webdavAttendee1Delegate, attendee1DelegateCalendar, icsName, 404)
|
||||
}, 10000) // increase timeout for this long test
|
||||
}) // increase timeout for this long test
|
||||
})
|
||||
@@ -70,6 +70,10 @@ X-AIM:pseudo aim
|
||||
END:VCARD`
|
||||
}
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
describe('CardDAV extensions', function() {
|
||||
const webdav = new WebDAV(config.username, config.password)
|
||||
const webdav_su = new WebDAV(config.superuser, config.superuser_password)
|
||||
@@ -232,7 +236,7 @@ describe('CardDAV extensions', function() {
|
||||
expect(emails)
|
||||
.withContext(`Returned vCard has email of ${config.attendee1_username} (${config.attendee1})`)
|
||||
.toContain(config.attendee1)
|
||||
}, 10000) // increase timeout for this long test
|
||||
}) // increase timeout for this long test
|
||||
|
||||
// CARDDAV:addressbook-multiget Report
|
||||
// https://datatracker.ietf.org/doc/html/rfc6352#section-8.7
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import config from '../lib/config'
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
describe('config tests', function() {
|
||||
|
||||
it('required configuration parameters', async function() {
|
||||
|
||||
@@ -2,6 +2,10 @@ import config from '../lib/config'
|
||||
import WebDAV from '../lib/WebDAV'
|
||||
import TestUtility from '../lib/utilities'
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
describe('create, read, modify, delete tasks for regular user', function() {
|
||||
const webdav = new WebDAV(config.username, config.password)
|
||||
const webdav_su = new WebDAV(config.superuser, config.superuser_password)
|
||||
|
||||
@@ -2,6 +2,10 @@ import config from '../lib/config'
|
||||
import WebDAV from '../lib/WebDAV'
|
||||
import TestUtility from '../lib/utilities'
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
describe('create, read, modify, delete events for regular user', function() {
|
||||
const webdav = new WebDAV(config.username, config.password)
|
||||
const webdav_su = new WebDAV(config.superuser, config.superuser_password)
|
||||
|
||||
@@ -10,6 +10,10 @@ import TestUtility from '../lib/utilities'
|
||||
* additional calendars.
|
||||
*/
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
describe('Apple iCal', function() {
|
||||
const webdav = new WebDAV(config.username, config.password)
|
||||
const webdav_su = new WebDAV(config.superuser, config.superuser_password)
|
||||
@@ -229,5 +233,5 @@ describe('Apple iCal', function() {
|
||||
.toBe(0)
|
||||
|
||||
await webdav_su.deleteObject(otherResource)
|
||||
}, 10000) // increase timeout for this long test
|
||||
}) // increase timeout for this long test
|
||||
})
|
||||
@@ -1,6 +1,10 @@
|
||||
import config from '../lib/config'
|
||||
import { default as WebDAV, DAVInverse } from '../lib/WebDAV'
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
describe('calendar classification', function() {
|
||||
const webdav = new WebDAV(config.username, config.password)
|
||||
|
||||
@@ -35,7 +39,7 @@ describe('calendar classification', function() {
|
||||
expect(status)
|
||||
.withContext('Setting an invalid classification')
|
||||
.toBe(403)
|
||||
})
|
||||
})
|
||||
|
||||
it('setting a valid classification', async function() {
|
||||
for (let component of ['events', 'tasks']) {
|
||||
|
||||
@@ -2,6 +2,10 @@ import config from '../lib/config'
|
||||
import WebDAV from '../lib/WebDAV'
|
||||
import TestUtility from '../lib/utilities'
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
describe('public access', function() {
|
||||
const webdav = new WebDAV(config.username, config.password)
|
||||
const webdav_anon = new WebDAV()
|
||||
|
||||
@@ -2,6 +2,10 @@ import config from '../lib/config'
|
||||
import WebDAV from '../lib/WebDAV'
|
||||
import TestUtility from '../lib/utilities'
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
describe('DAVCalendarSuperUserAcl', function() {
|
||||
const webdav = new WebDAV(config.username, config.password)
|
||||
const webdav_su = new WebDAV(config.superuser, config.superuser_password)
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import config from '../lib/config'
|
||||
import { default as WebDAV, DAVInverse } from '../lib/WebDAV'
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
describe('contacts categories', function() {
|
||||
const webdav = new WebDAV(config.username, config.password)
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import config from '../lib/config'
|
||||
import WebDAV from '../lib/WebDAV'
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
describe('public access', function() {
|
||||
const webdav_anon = new WebDAV()
|
||||
|
||||
|
||||
@@ -3,6 +3,10 @@ import WebDAV from '../lib/WebDAV'
|
||||
|
||||
let webdav, resource
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
describe('HTTP Calendar', function() {
|
||||
|
||||
beforeAll(async function() {
|
||||
|
||||
@@ -3,6 +3,10 @@ import Preferences from '../lib/Preferences'
|
||||
|
||||
const prefs = new Preferences(config.username, config.password)
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
describe('preferences', function() {
|
||||
|
||||
// preferencesTest
|
||||
|
||||
@@ -152,6 +152,10 @@ let msg3Size = 720
|
||||
let webdav, utility
|
||||
let user, resource, mailboxesList
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
// DAVMailCollectionTest
|
||||
|
||||
describe('MailDAV', function() {
|
||||
|
||||
@@ -6,6 +6,10 @@ import ManageSieve from '../lib/ManageSieve'
|
||||
|
||||
let prefs, webdav, utility, manageSieve, user
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
describe('Sieve', function() {
|
||||
|
||||
async function _getSogoSieveScript() {
|
||||
|
||||
@@ -5,6 +5,10 @@ const os = require('os')
|
||||
const path = require('path')
|
||||
const { execSync } = require('child_process')
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
describe('sogo-tool tests', function() {
|
||||
let tmpdir, isRoot
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@ import config from '../lib/config'
|
||||
import WebDAV from '../lib/WebDAV'
|
||||
import TestUtility from '../lib/utilities'
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
describe('WebDAV', function() {
|
||||
var webdav
|
||||
var utility
|
||||
|
||||
@@ -3,6 +3,10 @@ import WebDAV from '../lib/WebDAV'
|
||||
import { DAVNamespace, DAVNamespaceShorthandMap } from 'tsdav'
|
||||
import convert from 'xml-js'
|
||||
|
||||
beforeAll(function () {
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = config.timeout || 10000;
|
||||
});
|
||||
|
||||
describe('webdav sync', function() {
|
||||
const webdav = new WebDAV(config.username, config.password)
|
||||
const webdav_su = new WebDAV(config.superuser, config.superuser_password)
|
||||
|
||||
@@ -419,6 +419,7 @@
|
||||
max = [records count];
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
version = 0;
|
||||
if (count > 0 && count%100 == 0)
|
||||
{
|
||||
DESTROY(pool);
|
||||
@@ -428,7 +429,7 @@
|
||||
cName = [currentRecord objectForKey: @"c_name"];
|
||||
if (![existingRecords objectForKey: cName])
|
||||
{
|
||||
NSLog (@"restoring record '%@'", cName);
|
||||
NSLog (@"restoring record '%@' with version %d", cName, version);
|
||||
cContent = [currentRecord objectForKey: @"c_content"];
|
||||
[gcsFolder writeContent: cContent
|
||||
fromComponent: [[self parsingClassForContent: cContent] parseSingleFromSource: cContent]
|
||||
|
||||
@@ -278,6 +278,9 @@ static NSString *_sanitizeHtmlForDisplay(NSString *content)
|
||||
unichar *sanitizedChars, *start, *currentChar;
|
||||
BOOL inComment;
|
||||
|
||||
if (rawContent)
|
||||
return;
|
||||
|
||||
/**
|
||||
* Sanitize style
|
||||
* - remove control characters
|
||||
@@ -341,10 +344,11 @@ static NSString *_sanitizeHtmlForDisplay(NSString *content)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!inComment && currentChar > start)
|
||||
if (!inComment && currentChar > start) {
|
||||
if (*currentChar == '}' && *currentChar++ == '\000') currentChar++; // Add offset
|
||||
[sanitizedStyle appendString: [NSString stringWithCharacters: start
|
||||
length: (currentChar - start)]];
|
||||
|
||||
}
|
||||
/**
|
||||
* Parse sanitized style
|
||||
* - remove at-rule definitions
|
||||
@@ -384,8 +388,7 @@ static NSString *_sanitizeHtmlForDisplay(NSString *content)
|
||||
(*(currentChar-7) == 'p' || *(currentChar-7) == 'P') &&
|
||||
(*(currentChar-8) == 'm' || *(currentChar-8) == 'M') &&
|
||||
(*(currentChar-9) == 'i' || *(currentChar-9) == 'I') &&
|
||||
*(currentChar-10) == '!')
|
||||
&& !rawContent)
|
||||
*(currentChar-10) == '!'))
|
||||
{
|
||||
length = (currentChar - start);
|
||||
[declaration appendFormat: @"%@ !important;",
|
||||
|
||||
@@ -722,12 +722,14 @@ static NSArray *infoKeys = nil;
|
||||
|
||||
if ([[mime encoding] isEqualToString: @"base64"] && contentId) {
|
||||
if ([text rangeOfString: contentId].location != NSNotFound) {
|
||||
lText = [text stringByReplacingOccurrencesOfString: contentId
|
||||
if (nil != [[mime body] bytes]) {
|
||||
lText = [text stringByReplacingOccurrencesOfString: contentId
|
||||
withString: [NSString stringWithFormat: @"data:%@;base64,%@",
|
||||
[[mime contentType] stringValue],
|
||||
[NSString stringWithUTF8String: [[mime body] bytes]]]];
|
||||
[self setText: lText];
|
||||
[draft deleteAttachmentWithName: [draftFileAttachement objectForKey:@"filename"]];
|
||||
[self setText: lText];
|
||||
[draft deleteAttachmentWithName: [draftFileAttachement objectForKey:@"filename"]];
|
||||
}
|
||||
} else {
|
||||
// This is an attachment with no CID in message body
|
||||
if ([draft inReplyTo]) {
|
||||
|
||||
@@ -1742,9 +1742,12 @@ static NSArray *reminderValues = nil;
|
||||
- (id <WOActionResults>) saveAction
|
||||
{
|
||||
id <WOActionResults> results;
|
||||
NSString *requestStr;
|
||||
id o, v;
|
||||
|
||||
o = [[[context request] contentAsString] objectFromJSONString];
|
||||
requestStr = [[context request] contentAsString];
|
||||
requestStr = [requestStr stringWithoutHTMLInjection: NO];
|
||||
o = [requestStr objectFromJSONString];
|
||||
results = nil;
|
||||
|
||||
// Proceed with data sanitization of the "defaults"
|
||||
|
||||
@@ -351,7 +351,7 @@ static NSArray *tasksFields = nil;
|
||||
if (daylightOffset)
|
||||
{
|
||||
// If it is the end date and allday, we need to remove the offset
|
||||
if ([fields[count * 2] isEqualToString: @"endDate"] && [[theRecord objectForKey: @"c_isallday"] boolValue])
|
||||
if ([fields[count * 2] isEqualToString: @"endDate"] && [[theRecord objectForKey: @"c_isallday"] boolValue] && daylightOffset > 0)
|
||||
aDate = [aDate dateByAddingYears: 0 months: 0 days: 0 hours: 0
|
||||
minutes: 0 seconds: -1 * daylightOffset];
|
||||
else
|
||||
|
||||
@@ -157,7 +157,8 @@
|
||||
sg-email="::viewer.message.from[0].email"
|
||||
size="40">person</sg-avatar-image>
|
||||
<div>
|
||||
<span ng-bind-html="::viewer.message.from[0].name"><!-- from --></span>
|
||||
<span ng-if="viewer.message.from[0].nameHighlighted" ng-bind-html="::viewer.message.from[0].nameHighlighted"><!-- from --></span>
|
||||
<span ng-if="!viewer.message.from[0].nameHighlighted" ng-bind-html="::viewer.message.from[0].name"><!-- from --></span>
|
||||
<a href="#" class="md-caption"
|
||||
ng-bind="::viewer.message.from[0].email"
|
||||
ng-click="viewer.selectRecipient(viewer.message.from[0], $event)"><!-- from --></a>
|
||||
|
||||
@@ -205,19 +205,7 @@
|
||||
<div class="sg-form-section"
|
||||
ng-show="editor.component.start">
|
||||
<div layout="row" layout-align="start center">
|
||||
<md-input-container class="md-block md-flex">
|
||||
<label><var:string label:value="Repeat"/></label>
|
||||
<md-select ng-model="editor.component.repeat.frequency" ng-disabled="editor.component.occurrenceId">
|
||||
<md-option ng-value="frequency[0]" ng-repeat="frequency in ::editor.frequencies()" ng-bind-html="frequency[1]"><!-- frequency --></md-option>
|
||||
</md-select>
|
||||
</md-input-container>
|
||||
<md-button type="button" class="sg-icon-button"
|
||||
label:aria-label="repeat_CUSTOM"
|
||||
ng-disabled="editor.component.occurrenceId"
|
||||
ng-show="editor.component.repeat.frequency != 'never'"
|
||||
ng-click="editor.toggleRecurrenceEditor()">
|
||||
<md-icon ng-class="{'md-rotate-45': editor.showRecurrenceEditor}">add</md-icon>
|
||||
</md-button>
|
||||
<var:component className="UIxRecurrenceListEditor" />
|
||||
</div>
|
||||
<div ng-show="editor.showRecurrenceEditor" flex-offset="5">
|
||||
<var:component className="UIxRecurrenceEditor" />
|
||||
|
||||
@@ -260,6 +260,9 @@
|
||||
config.htmlEmbed = {
|
||||
showPreviews: true
|
||||
};
|
||||
config.mediaEmbed = {
|
||||
providers: []
|
||||
};
|
||||
config.image = {
|
||||
resizeUnit: "px",
|
||||
insert: {
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
!function(){"use strict";function c(e){var t=this;"function"!=typeof e.then&&(angular.extend(this,e),_.forEach(this.identities,function(e){var t;e.fullName&&e.email?e.full=e.fullName+" <"+e.email+">":e.email?e.full="<"+e.email+">":e.full="",e.signature&&(t=angular.element("<div>"+e.signature+"</div>"),e.textSignature=_.map(t.contents(),"textContent").join(" ").trim())}),this.$mailboxes)&&c.$Mailbox.$unwrapCollection(this,c.$q.when({mailboxes:this.$mailboxes})).then(function(e){t.$mailboxes=e})}c.$factory=["$q","$timeout","$log","sgSettings","Resource","Preferences","Mailbox","Message",function(e,t,s,n,i,a,o,r){return angular.extend(c,{$q:e,$timeout:t,$log:s,$$resource:new i(n.activeUser("folderURL")+"Mail",n.activeUser()),$Preferences:a,$Mailbox:o,$Message:r}),c}];try{angular.module("SOGo.MailerUI")}catch(e){angular.module("SOGo.MailerUI",["SOGo.Common"])}angular.module("SOGo.MailerUI").factory("Account",c.$factory),c.$findAll=function(e){return e?c.$unwrapCollection(e):c.$accounts?c.$q.when(c.$accounts):c.$$resource.fetch("","mailAccounts").then(function(e){return c.$unwrapCollection(e)})},c.$unwrapCollection=function(e){var s=[];return angular.forEach(e,function(e,t){e.id=t,s[t]=new c(e)}),c.$accounts=s},c.refreshUnseenCount=function(e){var t,s=1===c.$Preferences.defaults.SOGoMailFetchAllUnseenCountFolders,n=c.$Preferences.defaults.SOGoRefreshViewCheck;if(s)t=[];else{if(!e)throw Error("SOGoMailFetchAllUnseenCountFolders is disabled and no folders list provided");t=e}_.forEach(c.$accounts,function(e){s?_.forEach(e.$$flattenMailboxes,function(e){t.push(e.id)}):(_.includes(t,e.id+"/folderINBOX")||t.push(e.id+"/folderINBOX"),_.forEach(e.$$flattenMailboxes,function(e){angular.isDefined(e.unseenCount)&&!_.includes(t,e.id)&&t.push(e.id)}))}),c.$$resource.post("","unseenCount",{mailboxes:t}).then(function(t){_.forEach(c.$accounts,function(e){_.forEach(e.$$flattenMailboxes,function(e){angular.isDefined(t[e.id])&&(e.unseenCount=t[e.id])})})}),n&&"manually"!=n&&(c.$refreshUnseenCount&&c.$timeout.cancel(c.$refreshUnseenCount),c.$refreshUnseenCount=c.$timeout(angular.bind(this,c.refreshUnseenCount,e),1e3*n.timeInterval()))},c.prototype.getLength=function(){return this.$expanded?this.$flattenMailboxes().length:0},c.prototype.getItemAtIndex=function(e){var t=this.$flattenMailboxes();return 0<=e&&e<t.length?t[e]:null},c.prototype.$getMailboxes=function(e){var a=this,t=e&&e.reload;return this.$mailboxes&&!t?c.$q.when(this.$mailboxes):(!t&&this.$futureMailboxesData||(this.$futureMailboxesData=c.$Mailbox.$find(this,e).then(function(e){function s(e){_.forEach(e,function(e){var t=_.find(n,["id",e.id]);t&&(e.unseenCount=t.unseenCount),e.children&&0<e.children.length&&s(e.children)})}var n=a.$flattenMailboxes({all:!0});a.$mailboxes=e,a.$expanded=!1;s(a.$mailboxes);function t(e){_.forEach(e,function(e){e.$expanded=0<=i.indexOf("/"+e.id),e.children&&0<e.children.length&&t(e.children)})}var i;if(c.$Preferences.settings.Mail.ExpandedFolders){if(angular.isString(c.$Preferences.settings.Mail.ExpandedFolders))try{i=angular.fromJson(c.$Preferences.settings.Mail.ExpandedFolders)}catch(e){c.$log.warn("Can't parse list of expanded folders. String was: "+c.$Preferences.settings.Mail.ExpandedFolders),i=[]}else i=c.$Preferences.settings.Mail.ExpandedFolders;a.$expanded=0<=i.indexOf("/"+a.id),0<i.length&&t(a.$mailboxes)}return c.$accounts&&(a.$expanded|=1==c.$accounts.length),a.$flattenMailboxes({reload:!0}),a.$mailboxes})),this.$futureMailboxesData)},c.prototype.$flattenMailboxes=function(t){function s(e){_.forEach(e,function(e){n.push(e),(t&&t.all||e.$expanded)&&e.children&&0<e.children.length&&s(e.children)})}var n=[],i=[];return!this.$$flattenMailboxes||t&&(t.reload||t.all)?(s(this.$mailboxes),t&&t.all||(this.$$flattenMailboxes=n,t&&t.saveState&&(_.forEach(c.$accounts,function(e){e.$expanded&&i.push("/"+e.id),_.reduce(e.$$flattenMailboxes,function(e,t){return t.$expanded&&e.push("/"+t.id),e},i)}),c.$$resource.post(null,"saveFoldersState",i)))):n=this.$$flattenMailboxes,n},c.prototype.$getMailboxByType=function(s){function n(e){var t=_.find(e,function(e){return e.type==s});return t||angular.forEach(e,function(e){!t&&e.children&&0<e.children.length&&(t=n(e.children))}),t}return n(this.$mailboxes)},c.prototype.$getMailboxByPath=function(s){function n(e){var t=_.find(e,function(e){return e.path==s});return t||angular.forEach(e,function(e){!t&&e.children&&0<e.children.length&&(t=n(e.children))}),t}var e;if(null==(e=n(this.$mailboxes)))throw Error("No mailbox found matching path "+s);return e},c.prototype.$newMailbox=function(e,t){var s=this;return c.$$resource.post(e.toString(),"createFolder",{name:t}).then(function(){s.$getMailboxes({reload:!0})})},c.prototype.getTextSignature=function(e){var t;return e.signature?(t=angular.element("<div>"+e.signature+"</div>"),e.textSignature=_.map(t.contents(),"textContent").join(" ").trim()):e.textSignature="",e.textSignature},c.prototype.$hasCertificate=function(){return this.security&&this.security.hasCLine truncated
|
||||
!function(){"use strict";function c(e){var t=this;"function"!=typeof e.then&&(angular.extend(this,e),_.forEach(this.identities,function(e){var t;e.fullName&&e.email?e.full=e.fullName+" <"+e.email+">":e.email?e.full="<"+e.email+">":e.full="",e.signature&&(t=angular.element("<div>"+e.signature+"</div>"),e.textSignature=_.map(t.contents(),"textContent").join(" ").trim())}),this.$mailboxes)&&c.$Mailbox.$unwrapCollection(this,c.$q.when({mailboxes:this.$mailboxes})).then(function(e){t.$mailboxes=e})}c.$factory=["$q","$timeout","$log","sgSettings","Resource","Preferences","Mailbox","Message",function(e,t,s,n,i,a,o,r){return angular.extend(c,{$q:e,$timeout:t,$log:s,$$resource:new i(n.activeUser("folderURL")+"Mail",n.activeUser()),$Preferences:a,$Mailbox:o,$Message:r}),c}];try{angular.module("SOGo.MailerUI")}catch(e){angular.module("SOGo.MailerUI",["SOGo.Common"])}angular.module("SOGo.MailerUI").factory("Account",c.$factory),c.$findAll=function(e){return e?c.$unwrapCollection(e):c.$accounts?c.$q.when(c.$accounts):c.$$resource.fetch("","mailAccounts").then(function(e){return c.$unwrapCollection(e)})},c.$unwrapCollection=function(e){var s=[];return angular.forEach(e,function(e,t){e.id=t,s[t]=new c(e)}),c.$accounts=s},c.refreshUnseenCount=function(e){var t,s=1===c.$Preferences.defaults.SOGoMailFetchAllUnseenCountFolders,n=c.$Preferences.defaults.SOGoRefreshViewCheck;if(s)t=[];else{if(!e)throw Error("SOGoMailFetchAllUnseenCountFolders is disabled and no folders list provided");t=e}_.forEach(c.$accounts,function(e){s?_.forEach(e.$$flattenMailboxes,function(e){t.push(e.id)}):(_.includes(t,e.id+"/folderINBOX")||t.push(e.id+"/folderINBOX"),_.forEach(e.$$flattenMailboxes,function(e){angular.isDefined(e.unseenCount)&&!_.includes(t,e.id)&&t.push(e.id)}))}),c.$$resource.post("","unseenCount",{mailboxes:t}).then(function(t){_.forEach(c.$accounts,function(e){_.forEach(e.$$flattenMailboxes,function(e){angular.isDefined(t[e.id])&&(e.unseenCount=t[e.id])})})}),n&&"manually"!=n&&(c.$refreshUnseenCount&&c.$timeout.cancel(c.$refreshUnseenCount),c.$refreshUnseenCount=c.$timeout(angular.bind(this,c.refreshUnseenCount,e),1e3*n.timeInterval()))},c.prototype.getLength=function(){return this.$expanded?this.$flattenMailboxes().length:0},c.prototype.getItemAtIndex=function(e){var t=this.$flattenMailboxes();return 0<=e&&e<t.length?t[e]:null},c.prototype.$getMailboxes=function(e){var a=this,t=e&&e.reload;return this.$mailboxes&&!t?c.$q.when(this.$mailboxes):(!t&&this.$futureMailboxesData||(this.$futureMailboxesData=c.$Mailbox.$find(this,e).then(function(e){function s(e){_.forEach(e,function(e){var t=_.find(n,["id",e.id]);t&&(e.unseenCount=t.unseenCount),e.children&&0<e.children.length&&s(e.children)})}var n=a.$flattenMailboxes({all:!0});a.$mailboxes=e,a.$expanded=!1;s(a.$mailboxes);function t(e){_.forEach(e,function(e){e.$expanded=0<=i.indexOf("/"+e.id),e.children&&0<e.children.length&&t(e.children)})}var i;if(c.$Preferences.settings.Mail.ExpandedFolders){if(angular.isString(c.$Preferences.settings.Mail.ExpandedFolders))try{i=angular.fromJson(c.$Preferences.settings.Mail.ExpandedFolders)}catch(e){c.$log.warn("Can't parse list of expanded folders. String was: "+c.$Preferences.settings.Mail.ExpandedFolders),i=[]}else i=c.$Preferences.settings.Mail.ExpandedFolders;a.$expanded=0<=i.indexOf("/"+a.id),0<i.length&&t(a.$mailboxes)}return c.$accounts&&(a.$expanded|=1==c.$accounts.length),a.$flattenMailboxes({reload:!0}),a.$mailboxes})),this.$futureMailboxesData)},c.prototype.$flattenMailboxes=function(t){function s(e){_.forEach(e,function(e){n.push(e),(t&&t.all||e.$expanded)&&e.children&&0<e.children.length&&s(e.children)})}var n=[],i=[];return!this.$$flattenMailboxes||t&&(t.reload||t.all)?(s(this.$mailboxes),t&&t.all||(this.$$flattenMailboxes=n,t&&t.saveState&&(_.forEach(c.$accounts,function(e){e.$expanded&&i.push("/"+e.id),_.reduce(e.$$flattenMailboxes,function(e,t){return t.$expanded&&e.push("/"+t.id),e},i)}),c.$$resource.post(null,"saveFoldersState",i)))):n=this.$$flattenMailboxes,n},c.prototype.$getMailboxByType=function(s){function n(e){var t=_.find(e,function(e){return e.type==s});return t||angular.forEach(e,function(e){!t&&e.children&&0<e.children.length&&(t=n(e.children))}),t}return n(this.$mailboxes)},c.prototype.$getMailboxByPath=function(s){function n(e){var t=_.find(e,function(e){return e.path==s});return t||angular.forEach(e,function(e){!t&&e.children&&0<e.children.length&&(t=n(e.children))}),t}var e;if(null==(e=n(this.$mailboxes)))throw Error("No mailbox found matching path "+s);return e},c.prototype.$newMailbox=function(e,t){var s=this;return c.$$resource.post(e.toString(),"createFolder",{name:t}).then(function(){s.$getMailboxes({reload:!0})})},c.prototype.getTextSignature=function(e){var t;return e.signature?(t=angular.element("<div>"+e.signature+"</div>"),e.textSignature=_.map(t.contents(),"textContent").join(" ").trim()):e.textSignature="",e.textSignature},c.prototype.$hasCertificate=function(){return this.security&&this.security.hasCLine truncated
|
||||
//# sourceMappingURL=Mailer.services.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"Mailer.services.js","sources":["Mailer/Account.service.js","Mailer/Mailbox.service.js","Mailer/Message.service.js","Mailer/sgImageGallery.service.js","Mailer/VirtualMailbox.service.js","Mailer/MailboxController.js","Mailer/MailboxesController.js","Mailer/MessageController.js","Mailer/MessageEditorController.js","Mailer/sgAccountSection.directive.js","Mailer/sgIMIP.directive.js","Mailer/sgMailboxListItem.directive.js","Mailer/sgMessageListItem.directive.js","Mailer/sgMessageListItemMain.directive.js","Mailer/sgZoomableImage.directive.js"],"names":["Account","futureAccountData","_this","this","then","angular","extend","_","forEach","identities","identity","element","fullName","email","full","signature","textSignature","map","contents","join","trim","$mailboxes","$Mailbox","$unwrapCollection","$q","when","mailboxes","collection","$factory","$timeout","$log","Settings","Resource","Preferences","Mailbox","Message","$$resource","activeUser","$Preferences","$Message","module","e","factory","$findAll","data","$accounts","fetch","o","i","id","refreshUnseenCount","folders","unseenCountFolders","fetchAllUnseenCountFolders","defaults","SOGoMailFetchAllUnseenCountFolders","refreshViewCheck","SOGoRefreshViewCheck","Error","account","$$flattenMailboxes","mailbox","push","includes","isDefined","unseenCount","post","$refreshUnseenCount","cancel","bind","timeInterval","prototype","getLength","$expanded","$flattenMailboxes","length","getItemAtIndex","index","expandedMailboxes","$getMailboxes","options","reload","$futureMailboxesData","$find","_visitForUnseencount","previousMailbox","find","previousMailboxes","children","all","_visitForExpanded","expandedFolders","indexOf","settings","Mail","ExpandedFolders","isString","fromJson","warn","_visit","allMailboxes","saveState","reduce","$getMailboxByType","type","_find","$getMailboxByPath","path","$newMailbox","name","toString","getTextSignature","$hasCertificate","security","hasCertificate","$certificate","$$certificate","reject","$removeCertificate","updateQuota","percent","description","maxQuota","Math","round","usedSpace","l","formatted","maxMessages","messagesCount","$quota","$newMessage","debug","JSON","stringify","undefined","accountId","mailboxPath","message","$absolutePath","asDraft","accountDefaults","AuxiliaryMailAccounts","alwaysSign","sign","alwaysEncrypt","encrypt","editable","isNew","mailto","isObject","$parseMailto","$addDelegate","user","deferred","defer","param","uid","delegates","resolve","users","status","promise","$removeDelegate","splice","$omit","deep","defaultIdentity","value","key","copy","isReadOnly","pick","isDefault","forceDefaultIdentity","futureMailboxData","$account","init","newMailboxData","create","$unwrap","$rootScope","Acl","PRELOAD","BATCH_DELETE_LIMIT","$$Acl","$query","sort","asc","selectedFolder","$refreshTimeout","$virtualMode","$virtualPath","$searchMode","SortingState","parseInt","constant","LOOKAHEAD","SIZE","createMailboxes","level","isSentFolder","isDraftsFolder","quotas","split","component","asCSSIdentifier","isUndefined","uidsMap","headers","$isLoading","$messages","$visibleMessages","$selectedMessages","$highlightWords","$id","$acl","threaded","$collapsedThreads","threadsCollapsed","$displayName","$isEditable","isEditable","$isSpecial","$icon","$isNoInferiors","isNoInferiors","$shadowData","selectFolder","setSearchMode","searchMode","$lastVisibleIndex","max","$loadMessage","selectedMessages","updateCache","filter","selected","selectedCount","$unselectMessages","isSelectedMessage","messageId","$selectedMessage","selectedMessage","$selectedMessageIndex","hasSelectedMessage","$filter","sortingAttributes","filters","action","labels","searchBy","searchInput","word","cleanedWord","toLowerCase","match","secondFilter","$flaggedOnly","$unseenOnly","$syncToken","syncToken","unseenOnly","flaggedOnly","keys","$filteredLabels","k","f","endIndex","uids","startIndex","loaded","subject","min","loading","futureHeadersData","$unwrapHeaders","flags","isNoSelect","isWritable","getClassName","base","$rename","findParent","parent","parentMailbox","$save","_updateChildren","child","replace","pathRE","oldPath","sibling","localeCompare","RegExp","$compact","$canFolderAs","$setFolderAs","$empty","capitalize","substring","$markAsRead","isread","getLabels","$labels","filteredByLabel","$flagMessages","messages","operation","msgUIDs","forwardMessages","saveSelectedMessages","selectedUIDs","download","exportFolder","filename","open","$delete","$_deleteMessages","firstIndex","forEachRight","selectedIndex","findIndex","updateVisibleMessages","$deleteMessages","batchSize","_deleteMessages","start","end","currentUids","slice","$markOrUnMarkMessagesAsJunk","method","$copyMessages","folder","$moveMessages","$move","parentPath","finally","save","response","error","$reset","childrenArray","collapsedThread","msg","first","collapsed","$broadcast","$futureMailboxData","headersFields","msgObject","hasNewMessages","$topIndex","deleted","j","changed","msgs"Line truncated
|
||||
{"version":3,"file":"Mailer.services.js","sources":["Mailer/Account.service.js","Mailer/Mailbox.service.js","Mailer/Message.service.js","Mailer/sgImageGallery.service.js","Mailer/VirtualMailbox.service.js","Mailer/MailboxController.js","Mailer/MailboxesController.js","Mailer/MessageController.js","Mailer/MessageEditorController.js","Mailer/sgAccountSection.directive.js","Mailer/sgIMIP.directive.js","Mailer/sgMailboxListItem.directive.js","Mailer/sgMessageListItem.directive.js","Mailer/sgMessageListItemMain.directive.js","Mailer/sgZoomableImage.directive.js"],"names":["Account","futureAccountData","_this","this","then","angular","extend","_","forEach","identities","identity","element","fullName","email","full","signature","textSignature","map","contents","join","trim","$mailboxes","$Mailbox","$unwrapCollection","$q","when","mailboxes","collection","$factory","$timeout","$log","Settings","Resource","Preferences","Mailbox","Message","$$resource","activeUser","$Preferences","$Message","module","e","factory","$findAll","data","$accounts","fetch","o","i","id","refreshUnseenCount","folders","unseenCountFolders","fetchAllUnseenCountFolders","defaults","SOGoMailFetchAllUnseenCountFolders","refreshViewCheck","SOGoRefreshViewCheck","Error","account","$$flattenMailboxes","mailbox","push","includes","isDefined","unseenCount","post","$refreshUnseenCount","cancel","bind","timeInterval","prototype","getLength","$expanded","$flattenMailboxes","length","getItemAtIndex","index","expandedMailboxes","$getMailboxes","options","reload","$futureMailboxesData","$find","_visitForUnseencount","previousMailbox","find","previousMailboxes","children","all","_visitForExpanded","expandedFolders","indexOf","settings","Mail","ExpandedFolders","isString","fromJson","warn","_visit","allMailboxes","saveState","reduce","$getMailboxByType","type","_find","$getMailboxByPath","path","$newMailbox","name","toString","getTextSignature","$hasCertificate","security","hasCertificate","$certificate","$$certificate","reject","$removeCertificate","updateQuota","percent","description","maxQuota","Math","round","usedSpace","l","formatted","maxMessages","messagesCount","$quota","$newMessage","debug","JSON","stringify","undefined","accountId","mailboxPath","message","$absolutePath","asDraft","accountDefaults","AuxiliaryMailAccounts","alwaysSign","sign","alwaysEncrypt","encrypt","editable","isNew","mailto","isObject","$parseMailto","$addDelegate","user","deferred","defer","param","uid","delegates","resolve","users","status","promise","$removeDelegate","splice","$omit","deep","defaultIdentity","value","key","copy","isReadOnly","pick","isDefault","forceDefaultIdentity","futureMailboxData","$account","init","newMailboxData","create","$unwrap","$rootScope","Acl","PRELOAD","BATCH_DELETE_LIMIT","$$Acl","$query","sort","asc","selectedFolder","$refreshTimeout","$virtualMode","$virtualPath","$searchMode","SortingState","parseInt","constant","LOOKAHEAD","SIZE","createMailboxes","level","isSentFolder","isDraftsFolder","quotas","split","component","asCSSIdentifier","isUndefined","uidsMap","headers","$isLoading","$messages","$visibleMessages","$selectedMessages","$highlightWords","$id","$acl","threaded","$collapsedThreads","threadsCollapsed","$displayName","$isEditable","isEditable","$isSpecial","$icon","$isNoInferiors","isNoInferiors","$shadowData","selectFolder","setSearchMode","searchMode","$lastVisibleIndex","max","$loadMessage","selectedMessages","updateCache","filter","selected","selectedCount","$unselectMessages","isSelectedMessage","messageId","$selectedMessage","selectedMessage","$selectedMessageIndex","hasSelectedMessage","$filter","sortingAttributes","filters","action","labels","searchBy","searchInput","word","cleanedWord","toLowerCase","match","secondFilter","$flaggedOnly","$unseenOnly","$syncToken","syncToken","unseenOnly","flaggedOnly","keys","$filteredLabels","k","f","endIndex","uids","startIndex","loaded","subject","min","loading","futureHeadersData","$unwrapHeaders","flags","isNoSelect","isWritable","getClassName","base","$rename","findParent","parent","parentMailbox","$save","_updateChildren","child","replace","pathRE","oldPath","sibling","localeCompare","RegExp","$compact","$canFolderAs","$setFolderAs","$empty","capitalize","substring","$markAsRead","isread","getLabels","$labels","filteredByLabel","$flagMessages","messages","operation","msgUIDs","forwardMessages","saveSelectedMessages","selectedUIDs","download","exportFolder","filename","open","$delete","$_deleteMessages","firstIndex","forEachRight","selectedIndex","findIndex","updateVisibleMessages","$deleteMessages","batchSize","_deleteMessages","start","end","currentUids","slice","$markOrUnMarkMessagesAsJunk","method","$copyMessages","folder","$moveMessages","$move","parentPath","finally","save","response","error","$reset","Object","assign","childrenArray","collapsedThread","msg","first","collapsed","$broadcast","$futureMailboxData","headersFields","msgObject","hasNewMessages","$topIndex","deleted","jLine truncated
|
||||
@@ -1033,11 +1033,17 @@
|
||||
*/
|
||||
Mailbox.prototype.$reset = function(options) {
|
||||
var _this = this;
|
||||
var account;
|
||||
angular.forEach(this.$shadowData, function(value, key) {
|
||||
delete _this[key];
|
||||
});
|
||||
account = Object.assign({}, _this.$account)
|
||||
angular.extend(this, this.$shadowData);
|
||||
this.$shadowData = this.$omit();
|
||||
this.account = account;
|
||||
if (options && options.unseenCount) {
|
||||
this.unseenCount = options.unseenCount;
|
||||
}
|
||||
if (options && options.filter) {
|
||||
this.$messages = [];
|
||||
this.$visibleMessages = [];
|
||||
|
||||
@@ -51,8 +51,6 @@
|
||||
});
|
||||
|
||||
$rootScope.$on('resetMailAdvancedSearchPanel', function () {
|
||||
vm.service.$virtualPath = false;
|
||||
vm.service.$virtualMode = false;
|
||||
vm.reset();
|
||||
});
|
||||
};
|
||||
|
||||
@@ -525,6 +525,8 @@
|
||||
markInstance.mark(this.$mailbox.getHighlightWords());
|
||||
data = dom.innerHTML;
|
||||
dom.remove();
|
||||
} else if (encodeEntities) {
|
||||
data = data.encodeEntities();
|
||||
}
|
||||
|
||||
return data;
|
||||
@@ -549,8 +551,8 @@
|
||||
Message.prototype.getHighlightFrom = function () {
|
||||
var i = 0;
|
||||
for (i = 0; i < this.from.length; i++) {
|
||||
this.from[i].full = this.highlightSearchTerms(this.from[i].full, false);
|
||||
this.from[i].name = this.highlightSearchTerms(this.from[i].name, false);
|
||||
this.from[i].fullHighlighted = this.highlightSearchTerms(this.from[i].full, false);
|
||||
this.from[i].nameHighlighted = this.highlightSearchTerms(this.from[i].name, false);
|
||||
}
|
||||
|
||||
return this.from;
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
sgMailboxListItemController.$inject = ['$scope', '$rootScope', '$element', '$state', '$timeout', '$mdToast', '$mdPanel', '$mdMedia', '$mdSidenav', 'sgConstant', 'Dialog', 'Mailbox', 'encodeUriFilter'];
|
||||
function sgMailboxListItemController($scope, $rootScope, $element, $state, $timeout, $mdToast, $mdPanel, $mdMedia, $mdSidenav, sgConstant, Dialog, Mailbox, encodeUriFilter) {
|
||||
sgMailboxListItemController.$inject = ['$scope', '$rootScope', '$element', '$state', '$timeout', '$mdToast', '$mdPanel', '$mdMedia', '$mdSidenav', 'sgConstant', 'Dialog', 'Mailbox', 'encodeUriFilter', '$window', 'Account'];
|
||||
function sgMailboxListItemController($scope, $rootScope, $element, $state, $timeout, $mdToast, $mdPanel, $mdMedia, $mdSidenav, sgConstant, Dialog, Mailbox, encodeUriFilter, $window, Account) {
|
||||
var $ctrl = this;
|
||||
|
||||
|
||||
@@ -84,15 +84,24 @@
|
||||
|
||||
|
||||
this.selectFolder = function($event) {
|
||||
$rootScope.$broadcast('resetMailAdvancedSearchPanel'); // Reset advanced search panel (broadcast event to MailboxesController)
|
||||
if (this.editMode || this.mailbox == Mailbox.selectedFolder || this.mailbox.isNoSelect())
|
||||
return;
|
||||
|
||||
this.mailbox.setHighlightWords([]);
|
||||
this.mailbox.setHighlightWords([]);
|
||||
|
||||
if (Mailbox.selectedFolder) {
|
||||
Mailbox.$virtualMode = false;
|
||||
Mailbox.selectedFolder.$reset({ filter: true });
|
||||
if (Mailbox.$virtualMode) {
|
||||
Mailbox.$virtualMode = false;
|
||||
Mailbox.$virtualPath = false;
|
||||
$rootScope.$broadcast('resetMailAdvancedSearchPanel'); // Reset advanced search panel (broadcast event to MailboxesController)
|
||||
if (Mailbox.selectedFolder.$mailboxes && Mailbox.selectedFolder.$mailboxes.length > 0) {
|
||||
Mailbox.selectedFolder.$reset({ filter: true, unseenCount: Mailbox.selectedFolder.$mailboxes[0].unseenCount });
|
||||
}
|
||||
} else {
|
||||
Mailbox.selectedFolder.$reset({ filter: true, unseenCount: Mailbox.selectedFolder.unseenCount });
|
||||
}
|
||||
}
|
||||
|
||||
this.accountController.selectFolder(this);
|
||||
if ($event) {
|
||||
$state.go('mail.account.mailbox', {
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
!function(){"use strict";function e(e,t){e.state("preferences",{abstract:!0,views:{preferences:{templateUrl:"preferences.html",controller:"PreferencesController",controllerAs:"app"}}}).state("preferences.general",{url:"/general",views:{module:{templateUrl:"generalPreferences.html"}}}).state("preferences.calendars",{url:"/calendars",views:{module:{templateUrl:"calendarsPreferences.html"}}}).state("preferences.addressbooks",{url:"/addressbooks",views:{module:{templateUrl:"addressbooksPreferences.html"}}}).state("preferences.mailer",{url:"/mailer",views:{module:{templateUrl:"mailerPreferences.html"}}}),t.rules.otherwise("/general")}function t(e,t,i,s){e.DebugEnabled||s.defaultErrorHandler(function(){}),i.onError({to:"preferences.**"},function(e){"preferences"==e.to().name||e.ignored()||(t.error("transition error to "+e.to().name+": "+e.error().detail),s.go({state:"preferences"}))})}angular.module("SOGo.PreferencesUI",["ui.router","sgCkeditor","angularFileUpload","SOGo.Common","SOGo.MailerUI","SOGo.ContactsUI","SOGo.Authentication","as.sortable"]).config(e).run(t),e.$inject=["$stateProvider","$urlServiceProvider"],t.$inject=["$window","$log","$transitions","$state"]}(),function(){"use strict";function e(a,e,t,i,r,s,n,o,c,d,f){var u=this,h=e.usesCASAuthentication||e.usesSAML2Authentication;function p(){u.account.security&&u.account.security.hasCertificate&&u.account.$certificate().then(function(e){u.certificate=e},function(){delete u.account.security.hasCertificate})}function m(e){e=0<e.type.indexOf("pkcs12")||/\.(p12|pfx)$/.test(e.name);return u.form.certificateFilename.$setValidity("fileformat",e),e}this.defaultPort=143,this.smtpDefaultPort=25,this.defaults=n,this.account=o,this.maxSize=f,this.accountId=c,this.hostnameRE=h&&0<c?/^(?!(127\.0\.0\.1|localhost(?:\.localdomain)?)$)/:/./,this.emailRE=String.emailRE,this.addressesSearchText="",this.ckConfig={autoGrow_minHeight:70,toolbar:{items:["bold","italic","|","fontColor","fontFamily","fontSize","|","link","|","specialCharacters","imageUpload","|","sourceEditing","htmlEmbed"],shouldNotGroupWhenFull:!0},language:n.ckLocaleCode},this.account.encryption?"ssl"==this.account.encryption&&(this.defaultPort=993):this.account.encryption="none",this.account.smtpEncryption?this.smtpDefaultPort=465:this.account.smtpEncryption="none",p(),this.uploader=new i({url:[s.activeUser("folderURL")+"Mail",c,"importCertificate"].join("/"),autoUpload:!1,queueLimit:1,filters:[{name:m,fn:m}],onAfterAddingFile:function(e){u.certificateFilename=e.file.name},onSuccessItem:function(e,t,i,s){this.clearQueue(),a(function(){_.assign(u.account,{security:{hasCertificate:!0},$$certificate:t})}),p()},onErrorItem:function(e,t,i,s){r.alert(l("Error"),l("An error occurred while importing the certificate. Verify your password."))}}),this.hasIdentities=function(){return 0<_.filter(this.account.identities,this.isEditableIdentity).length},this.isEditableIdentity=function(e){return!e.isReadOnly},this.selectIdentity=function(e){this.selectedIdentity==e?this.selectedIdentity=null:this.selectedIdentity=e},this.hasDefaultIdentity=function(){return 0<=_.findIndex(this.account.identities,function(e){return!!e.isDefault})},this.setDefaultIdentity=function(e,i){return _.forEach(this.account.identities,function(e,t){t==i?e.isDefault=!e.isDefault:delete e.isDefault}),e.stopPropagation(),!1},this.canRemoveIdentity=function(e){return e==this.selectedIdentity&&this.hasIdentities()},this.removeIdentity=function(e){this.account.identities.splice(e,1),this.selectedIdentity=null},this.addIdentity=function(){var e=_.findIndex(this.account.identities,{isReadOnly:1}),t={};e<0&&(e=this.account.identities.length),this.customFromIsReadonly()&&(t.fullName=this.account.identities[0].fullName),this.account.identities.splice(Math.max(e,0),0,t),this.selectedIdentity=e},this.showCkEditor=function(e){return this.selectedIdentity==e&&"html"==this.defaults.SOGoMailComposeMessageType},this.filterEmailAddresses=function(t){return _.filter(e.defaultEmailAddresses,function(e){return 0<=e.toLowerCase().indexOf(t.toLowerCase())})},this.customFromIsReadonly=function(){return!(0<c||d)},this.importCertificate=function(){this.uploader.queue[0].formData=[{password:this.certificatePassword}],this.uploader.uploadItem(0)},this.onBeforeUploadCertificate=function(e){this.form=e,this.uploader.clearQueue()},this.removeCertificate=function(){this.account.$removeCertificate()},this.cancel=function(){t.cancel()},this.save=function(){JSON.stringify(this.account).length>this.maxSize?r.alert(l("Error"),l("Data too big. Please contact technical support.")):t.hide()}}e.$inject=["$timeout","$window","$mdDialog","FileUploader","Dialog","sgSettings","defaults","account","accountId","mailCustomFromEnabled","maxSize"],angular.module("SOGo.PreferencesUI").controller("AccountDialogController",e)}(),function(){"use strict";function e(e,t,i,s,a,r,n,o,c){var d=t.sieveCapabilities,f=t.forwardEnabled,u=t.notificationEnabled;t.vacationEnabled;this.filter=a,this.mailboxes=r,thLine truncated
|
||||
!function(){"use strict";function e(e,t){e.state("preferences",{abstract:!0,views:{preferences:{templateUrl:"preferences.html",controller:"PreferencesController",controllerAs:"app"}}}).state("preferences.general",{url:"/general",views:{module:{templateUrl:"generalPreferences.html"}}}).state("preferences.calendars",{url:"/calendars",views:{module:{templateUrl:"calendarsPreferences.html"}}}).state("preferences.addressbooks",{url:"/addressbooks",views:{module:{templateUrl:"addressbooksPreferences.html"}}}).state("preferences.mailer",{url:"/mailer",views:{module:{templateUrl:"mailerPreferences.html"}}}),t.rules.otherwise("/general")}function t(e,t,i,s){e.DebugEnabled||s.defaultErrorHandler(function(){}),i.onError({to:"preferences.**"},function(e){"preferences"==e.to().name||e.ignored()||(t.error("transition error to "+e.to().name+": "+e.error().detail),s.go({state:"preferences"}))})}angular.module("SOGo.PreferencesUI",["ui.router","sgCkeditor","angularFileUpload","SOGo.Common","SOGo.MailerUI","SOGo.ContactsUI","SOGo.Authentication","as.sortable"]).config(e).run(t),e.$inject=["$stateProvider","$urlServiceProvider"],t.$inject=["$window","$log","$transitions","$state"]}(),function(){"use strict";function e(a,e,t,i,r,s,n,o,c,d,f){var u=this,h=e.usesCASAuthentication||e.usesSAML2Authentication;function p(){u.account.security&&u.account.security.hasCertificate&&u.account.$certificate().then(function(e){u.certificate=e},function(){delete u.account.security.hasCertificate})}function m(e){e=0<e.type.indexOf("pkcs12")||/\.(p12|pfx)$/.test(e.name);return u.form.certificateFilename.$setValidity("fileformat",e),e}this.defaultPort=143,this.smtpDefaultPort=25,this.defaults=n,this.account=o,this.maxSize=f,this.accountId=c,this.hostnameRE=h&&0<c?/^(?!(127\.0\.0\.1|localhost(?:\.localdomain)?)$)/:/./,this.emailRE=String.emailRE,this.addressesSearchText="",this.ckConfig={autoGrow_minHeight:70,toolbar:{items:["bold","italic","|","fontColor","fontFamily","fontSize","|","link","|","specialCharacters","imageUpload","|","sourceEditing","htmlEmbed"],shouldNotGroupWhenFull:!0},language:n.ckLocaleCode},this.account.encryption?"ssl"==this.account.encryption&&(this.defaultPort=993):this.account.encryption="none",this.account.smtpEncryption?this.smtpDefaultPort=465:this.account.smtpEncryption="none",p(),this.uploader=new i({url:[s.activeUser("folderURL")+"Mail",c,"importCertificate"].join("/"),autoUpload:!1,queueLimit:1,filters:[{name:m,fn:m}],onAfterAddingFile:function(e){u.certificateFilename=e.file.name},onSuccessItem:function(e,t,i,s){this.clearQueue(),a(function(){_.assign(u.account,{security:{hasCertificate:!0},$$certificate:t})}),p()},onErrorItem:function(e,t,i,s){r.alert(l("Error"),l("An error occurred while importing the certificate. Verify your password."))}}),this.hasIdentities=function(){return 0<_.filter(this.account.identities,this.isEditableIdentity).length},this.isEditableIdentity=function(e){return!e.isReadOnly},this.selectIdentity=function(e){this.selectedIdentity==e?this.selectedIdentity=null:this.selectedIdentity=e},this.hasDefaultIdentity=function(){return 0<=_.findIndex(this.account.identities,function(e){return!!e.isDefault})},this.setDefaultIdentity=function(e,i){return _.forEach(this.account.identities,function(e,t){t==i?e.isDefault=!e.isDefault:delete e.isDefault}),e.stopPropagation(),!1},this.canRemoveIdentity=function(e){return e==this.selectedIdentity&&this.hasIdentities()},this.removeIdentity=function(e){this.account.identities.splice(e,1),this.selectedIdentity=null},this.addIdentity=function(){var e=_.findIndex(this.account.identities,{isReadOnly:1}),t={};e<0&&(e=this.account.identities.length),this.customFromIsReadonly()&&(t.fullName=this.account.identities[0].fullName),this.account.identities.splice(Math.max(e,0),0,t),this.selectedIdentity=e},this.showCkEditor=function(e){return this.selectedIdentity==e&&"html"==this.defaults.SOGoMailComposeMessageType},this.filterEmailAddresses=function(t){return _.filter(e.defaultEmailAddresses,function(e){return 0<=e.toLowerCase().indexOf(t.toLowerCase())})},this.customFromIsReadonly=function(){return!(0<c||d)},this.importCertificate=function(){this.uploader.queue[0].formData=[{password:this.certificatePassword}],this.uploader.uploadItem(0)},this.onBeforeUploadCertificate=function(e){this.form=e,this.uploader.clearQueue()},this.removeCertificate=function(){this.account.$removeCertificate()},this.cancel=function(){t.cancel()},this.save=function(){JSON.stringify(this.account).length>this.maxSize?r.alert(l("Error"),l("Data too big. Please contact technical support.")):t.hide()}}e.$inject=["$timeout","$window","$mdDialog","FileUploader","Dialog","sgSettings","defaults","account","accountId","mailCustomFromEnabled","maxSize"],angular.module("SOGo.PreferencesUI").controller("AccountDialogController",e)}(),function(){"use strict";function e(e,t,i,s,a,r,n,o,c){var d=t.sieveCapabilities,f=t.forwardEnabled,u=t.notificationEnabled;t.vacationEnabled;this.filter=a,this.mailboxes=r,thLine truncated
|
||||
//# sourceMappingURL=Preferences.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"Preferences.js","sources":["Preferences/Preferences.app.js","Preferences/AccountDialogController.js","Preferences/FiltersDialogController.js","Preferences/PreferencesController.js"],"names":["configure","$stateProvider","$urlServiceProvider","state","abstract","views","preferences","templateUrl","controller","controllerAs","url","module","rules","otherwise","runBlock","$window","$log","$transitions","$state","DebugEnabled","defaultErrorHandler","onError","to","transition","name","ignored","error","detail","go","angular","config","run","$inject","AccountDialogController","$timeout","$mdDialog","FileUploader","Dialog","Settings","defaults","account","accountId","mailCustomFromEnabled","maxSize","vm","this","usesSSO","usesCASAuthentication","usesSAML2Authentication","_loadCertificate","security","hasCertificate","$certificate","then","crt","certificate","filterByExtension","item","isP12File","type","indexOf","test","form","certificateFilename","$setValidity","defaultPort","smtpDefaultPort","hostnameRE","emailRE","String","addressesSearchText","ckConfig","autoGrow_minHeight","toolbar","items","shouldNotGroupWhenFull","language","ckLocaleCode","encryption","smtpEncryption","uploader","activeUser","join","autoUpload","queueLimit","filters","fn","onAfterAddingFile","file","onSuccessItem","response","status","headers","clearQueue","_","assign","$$certificate","onErrorItem","alert","l","hasIdentities","filter","identities","isEditableIdentity","length","identity","isReadOnly","selectIdentity","index","selectedIdentity","hasDefaultIdentity","findIndex","isDefault","setDefaultIdentity","$event","$index","forEach","i","stopPropagation","canRemoveIdentity","removeIdentity","splice","addIdentity","firstReadonlyIndex","customFromIsReadonly","fullName","Math","max","showCkEditor","SOGoMailComposeMessageType","filterEmailAddresses","$query","defaultEmailAddresses","address","toLowerCase","importCertificate","queue","formData","password","certificatePassword","uploadItem","onBeforeUploadCertificate","removeCertificate","$removeCertificate","cancel","save","JSON","stringify","hide","FiltersDialogController","$scope","mailboxes","labels","validateForwardAddress","Preferences","sieveCapabilities","forwardEnabled","notificationEnabled","vacationEnabled","fieldLabels","subject","from","cc","to_or_cc","size","header","body","methodLabels","discard","keep","stop","redirect","notify","reject","fileinto","addflag","methods","intersection","keys","numberOperatorLabels","under","over","textOperatorLabels","is","is_not","contains","contains_not","matches","matches_not","regex","regex_not","hasRulesAndActions","requirements","actions","match","push","every","a","invalid","method","action","argument","err","message","addMailFilterRule","event","field","operator","removeMailFilterRule","addMailFilterAction","removeMailFilterAction","PreferencesController","$q","$mdMedia","$mdSidenav","$mdToast","sgSettings","focus","User","Account","Authentication","AddressBook","Date","beginOfDay","_loadAllMailboxes","mail","id","$getMailboxes","allMailboxes","$flattenMailboxes","all","domain","domains","forwardConstraints","defaultAddresses","adr","split","Error","forwardConstraintsDomains","$onInit","passwords","newPassword","newPasswordConfirmation","oldPassword","timeZonesList","timeZonesSearchText","autocomplete","forward","notification","mailLabelKeyRE","RegExp","emailSeparatorKeys","Notification","notificationMessage","notificationTranslated","SOGoMailAutoMarkAsReadMode","mailAutoMarkAsReadDelay","SOGoMailAutoMarkAsReadDelay","SOGoAlternateAvatar","$alternateAvatar","sieveVariablesCapability","hasActiveExternalSieveScripts","updateVacationDates","$valid","close","onLanguageChange","confirm","ok","quick","location","reload","onDesktopNotificationsChange","SOGoDesktopNotifications","authorizeNotifications","resetContactsCategories","SOGoContactsCategories","defaultContactsCategories","slice","$setDirty","resetCalendarCategories","SOGoCalendarCategories","defaultCalendarCategories","SOGoCalendarCategoriesColorsValues","values","addCalendarCategory","resetCalendarCategoryValidity","removeCalendarCategory","addContactCategory","removeContactCategory","onMailAutoMarkAsReadDelay","addMailAccount","ev","AuxiliaryMailAccounts","isNew","email","receipts","receiptAction","receiptNonRecipientAction","receiptOutsideDomainAction","receiptAnyAction","show","targetEvent","locals","CDefaultsSize","isArray","settings","Mail","ExpandedFolders","$omit","editMailAccount","data","cloneDeep","catch","noop","removeMailAccount","resetMailLabelValidity","addMailLabel","guid","SOGoMailLabelsColorsKeys","SOGoMailLabelsColorsValues","removeMailLabel","addMailFilter","active","SOGoMailLabelsColors","SOGoSieveFilters","editMailFilter","copy","removeMailFilter","onFiltersOrderChanged","_onFiltersOrderChanged","difference","Vacation","autoReplyEmailAddresses","addDefaultEmailAddresses","v","isDefined","union","userFilter","search","excludedUsers","minimumSearLine truncated
|
||||
{"version":3,"file":"Preferences.js","sources":["Preferences/Preferences.app.js","Preferences/AccountDialogController.js","Preferences/FiltersDialogController.js","Preferences/PreferencesController.js"],"names":["configure","$stateProvider","$urlServiceProvider","state","abstract","views","preferences","templateUrl","controller","controllerAs","url","module","rules","otherwise","runBlock","$window","$log","$transitions","$state","DebugEnabled","defaultErrorHandler","onError","to","transition","name","ignored","error","detail","go","angular","config","run","$inject","AccountDialogController","$timeout","$mdDialog","FileUploader","Dialog","Settings","defaults","account","accountId","mailCustomFromEnabled","maxSize","vm","this","usesSSO","usesCASAuthentication","usesSAML2Authentication","_loadCertificate","security","hasCertificate","$certificate","then","crt","certificate","filterByExtension","item","isP12File","type","indexOf","test","form","certificateFilename","$setValidity","defaultPort","smtpDefaultPort","hostnameRE","emailRE","String","addressesSearchText","ckConfig","autoGrow_minHeight","toolbar","items","shouldNotGroupWhenFull","language","ckLocaleCode","encryption","smtpEncryption","uploader","activeUser","join","autoUpload","queueLimit","filters","fn","onAfterAddingFile","file","onSuccessItem","response","status","headers","clearQueue","_","assign","$$certificate","onErrorItem","alert","l","hasIdentities","filter","identities","isEditableIdentity","length","identity","isReadOnly","selectIdentity","index","selectedIdentity","hasDefaultIdentity","findIndex","isDefault","setDefaultIdentity","$event","$index","forEach","i","stopPropagation","canRemoveIdentity","removeIdentity","splice","addIdentity","firstReadonlyIndex","customFromIsReadonly","fullName","Math","max","showCkEditor","SOGoMailComposeMessageType","filterEmailAddresses","$query","defaultEmailAddresses","address","toLowerCase","importCertificate","queue","formData","password","certificatePassword","uploadItem","onBeforeUploadCertificate","removeCertificate","$removeCertificate","cancel","save","JSON","stringify","hide","FiltersDialogController","$scope","mailboxes","labels","validateForwardAddress","Preferences","sieveCapabilities","forwardEnabled","notificationEnabled","vacationEnabled","fieldLabels","subject","from","cc","to_or_cc","size","header","body","methodLabels","discard","keep","stop","redirect","notify","reject","fileinto","addflag","methods","intersection","keys","numberOperatorLabels","under","over","textOperatorLabels","is","is_not","contains","contains_not","matches","matches_not","regex","regex_not","hasRulesAndActions","requirements","actions","match","push","every","a","invalid","method","action","argument","err","message","addMailFilterRule","event","field","operator","removeMailFilterRule","addMailFilterAction","removeMailFilterAction","PreferencesController","$q","$mdMedia","$mdSidenav","$mdToast","sgSettings","focus","User","Account","Authentication","AddressBook","Date","beginOfDay","_loadAllMailboxes","mail","id","$getMailboxes","allMailboxes","$flattenMailboxes","all","domain","domains","forwardConstraints","defaultAddresses","adr","split","Error","forwardConstraintsDomains","$onInit","passwords","newPassword","newPasswordConfirmation","oldPassword","timeZonesList","timeZonesSearchText","autocomplete","forward","notification","mailLabelKeyRE","RegExp","emailSeparatorKeys","Notification","notificationMessage","notificationTranslated","SOGoMailAutoMarkAsReadMode","mailAutoMarkAsReadDelay","SOGoMailAutoMarkAsReadDelay","SOGoAlternateAvatar","$alternateAvatar","sieveVariablesCapability","hasActiveExternalSieveScripts","updateVacationDates","$valid","close","onLanguageChange","confirm","ok","quick","location","reload","onDesktopNotificationsChange","SOGoDesktopNotifications","authorizeNotifications","resetContactsCategories","SOGoContactsCategories","defaultContactsCategories","slice","$setDirty","resetCalendarCategories","SOGoCalendarCategories","defaultCalendarCategories","SOGoCalendarCategoriesColorsValues","values","addCalendarCategory","resetCalendarCategoryValidity","removeCalendarCategory","addContactCategory","removeContactCategory","onMailAutoMarkAsReadDelay","addMailAccount","ev","AuxiliaryMailAccounts","isNew","email","receipts","receiptAction","receiptNonRecipientAction","receiptOutsideDomainAction","receiptAnyAction","show","targetEvent","locals","CDefaultsSize","isArray","settings","Mail","ExpandedFolders","$omit","editMailAccount","data","cloneDeep","catch","noop","removeMailAccount","resetMailLabelValidity","addMailLabel","guid","SOGoMailLabelsColorsKeys","SOGoMailLabelsColorsValues","removeMailLabel","addMailFilter","active","SOGoMailLabelsColors","SOGoSieveFilters","editMailFilter","copy","removeMailFilter","onFiltersOrderChanged","_onFiltersOrderChanged","difference","Vacation","autoReplyEmailAddresses","addDefaultEmailAddresses","v","isDefined","union","userFilter","search","excludedUsers","minimumSearLine truncated
|
||||
@@ -22,7 +22,7 @@
|
||||
this.emailSeparatorKeys = Preferences.defaults.emailSeparatorKeys;
|
||||
if(this.preferences.defaults.Notification) {
|
||||
if (!this.preferences.defaults.Notification.notificationMessage)
|
||||
this.preferences.defaults.Notification.notificationMessage = l('Notification Message', $window.defaultEmailAddresses);
|
||||
this.preferences.defaults.Notification.notificationMessage = l('Notification Message', $window.defaultEmailAddresses[0]);
|
||||
this.preferences.defaults.Notification.notificationTranslated = l('Notification');
|
||||
}
|
||||
if (Preferences.defaults.SOGoMailAutoMarkAsReadMode == 'delay')
|
||||
|
||||
@@ -73,6 +73,11 @@ ifeq ($(DIST_CODENAME), noble)
|
||||
MFA_CONFIG=--enable-mfa
|
||||
endif
|
||||
|
||||
# All other cases
|
||||
ifeq ($(MFA_CONFIG),)
|
||||
MFA_CONFIG=--enable-mfa
|
||||
endif
|
||||
|
||||
include /etc/GNUstep/GNUstep.conf
|
||||
include /usr/share/GNUstep/Makefiles/common.make
|
||||
|
||||
|
||||
Reference in new issue
Block a user