refactor(preferences): conditionally activate the Sieve script

All the user defaults are now editable through the Preferences module,
even if an external Sieve script is enabled. However, the user can
disable the external Sieve script and force the activation of the
"sogo" Sieve script.
This commit is contained in:
Francis Lachapelle committed 2019-11-15 14:37:35 -05:00
1 parent 350677bbce
commit 5b3d84ee24
8 files changed
+137 -94

No files matched your search

@@ -18,7 +18,6 @@
this.timeZonesSearchText = '';
this.sieveVariablesCapability = ($window.sieveCapabilities.indexOf('variables') >= 0);
this.mailLabelKeyRE = new RegExp(/^(?!^_\$)[^(){} %*\"\\\\]*?$/);
this.hasActiveExternalSieveScripts = $window.hasActiveExternalSieveScripts;
// Set alternate avatar in User service
if (Preferences.defaults.SOGoAlternateAvatar)
@@ -285,6 +284,11 @@
});
};
this.manageSieveScript = function(form) {
this.preferences.defaults.hasActiveExternalSieveScripts = false;
form.$setDirty();
};
this.confirmChanges = function($event, form) {
var target;