feat(preferences): can set SOGoForwardConstraints to 3 to accept both internal and external domains from SOGoForwardConstraintsDomains

This commit is contained in:
Hivert Quentin
2023-11-10 15:07:14 +01:00
parent d1634054d6
commit c872fb4d9c
6 changed files with 82 additions and 8 deletions
@@ -394,6 +394,13 @@
$window.forwardConstraintsDomains.indexOf(domain) < 0) {
throw new Error(l("You are not allowed to forward your messages to this domain:") + " " + domain);
}
else if ($window.forwardConstraints == 3 &&
domains.indexOf(domain) < 0 &&
($window.forwardConstraintsDomains.length > 0 &&
$window.forwardConstraintsDomains.indexOf(domain) < 0)) {
// If constraints mode is 3 and the domain is not an internal nor in forwardConstraintsDomains list, throw an error
throw new Error(l("You are not allowed to forward your messages to this domain:")+ " " + domain);
}
}
return true;