mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-18 11:38:53 +00:00
(feat) now possible to specify which domains you can forward your mails to
This commit is contained in:
@@ -63,6 +63,7 @@
|
||||
= "Please specify an address to which you want to forward your messages.";
|
||||
"You are not allowed to forward your messages to an external email address." = "You are not allowed to forward your messages to an external email address.";
|
||||
"You are not allowed to forward your messages to an internal email address." = "You are not allowed to forward your messages to an internal email address.";
|
||||
"You are not allowed to forward your messages to this domain:" = "You are not allowed to forward your messages to this domain:";
|
||||
|
||||
/* d & t */
|
||||
"Current Time Zone" = "Current Time Zone";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* UIxPreferences.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007-2018 Inverse inc.
|
||||
* Copyright (C) 2007-2019 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -1495,6 +1495,18 @@ static NSArray *reminderValues = nil;
|
||||
return [NSString stringWithFormat: @"%d", [dd forwardConstraints]];
|
||||
}
|
||||
|
||||
- (NSString *) forwardConstraintsDomains
|
||||
{
|
||||
NSMutableArray *domains;
|
||||
SOGoDomainDefaults *dd;
|
||||
|
||||
dd = [[context activeUser] domainDefaults];
|
||||
domains = [NSMutableArray array];
|
||||
[domains addObjectsFromArray: [dd forwardConstraintsDomains]];
|
||||
|
||||
return [domains jsonRepresentation];
|
||||
}
|
||||
|
||||
//
|
||||
// Used by templates
|
||||
//
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
var defaultEmailAddresses = '<var:string value="defaultEmailAddresses" const:escapeHTML="NO"/>';
|
||||
var defaultCalendarCategories = <var:string value="defaultCalendarCategoriesColors" const:escapeHTML="NO"/>;
|
||||
var forwardConstraints = <var:string value="forwardConstraints" const:escapeHTML="NO"/>;
|
||||
var forwardConstraintsDomains = <var:string value="forwardConstraintsDomains" const:escapeHTML="NO"/>;
|
||||
var sieveCapabilities = <var:string value="sieveCapabilities" const:escapeHTML="NO"/>;
|
||||
</script>
|
||||
|
||||
|
||||
@@ -347,6 +347,12 @@
|
||||
Dialog.alert(l('Error'), l("You are not allowed to forward your messages to an internal email address."));
|
||||
sendForm = false;
|
||||
}
|
||||
else if ($window.forwardConstraints == 2 &&
|
||||
$window.forwardConstraintsDomains.length > 0 &&
|
||||
$window.forwardConstraintsDomains.indexOf(domain) < 0) {
|
||||
Dialog.alert(l('Error'), l("You are not allowed to forward your messages to this domain:") + " " + domain);
|
||||
sendForm = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user