Always allow raw editing of Sieve scripts

This commit is contained in:
djmaze 2021-01-21 10:00:12 +01:00
parent 3ed7b53f68
commit 14ba459d46
20 changed files with 59 additions and 211 deletions

View file

@ -44,7 +44,6 @@ class DomainPopupView extends AbstractViewNext {
imapSecure: ServerSecure.None,
imapShortLogin: false,
useSieve: false,
sieveAllowRaw: false,
sieveServer: '',
sievePort: '4190',
sieveSecure: ServerSecure.None,
@ -174,28 +173,7 @@ class DomainPopupView extends AbstractViewNext {
this.saving(true);
Remote.createOrUpdateDomain(
this.onDomainCreateOrSaveResponse.bind(this),
!this.edit(),
this.name(),
this.imapServer(),
pInt(this.imapPort()),
this.imapSecure(),
this.imapShortLogin(),
this.useSieve(),
this.sieveAllowRaw(),
this.sieveServer(),
pInt(this.sievePort()),
this.sieveSecure(),
this.smtpServer(),
pInt(this.smtpPort()),
this.smtpSecure(),
this.smtpShortLogin(),
this.smtpAuth(),
this.smtpPhpMail(),
this.whiteList()
this
);
}
@ -211,22 +189,7 @@ class DomainPopupView extends AbstractViewNext {
Remote.testConnectionForDomain(
this.onTestConnectionResponse.bind(this),
this.name(),
this.imapServer(),
pInt(this.imapPort()),
this.imapSecure(),
this.useSieve(),
this.sieveServer(),
pInt(this.sievePort()),
this.sieveSecure(),
this.smtpServer(),
pInt(this.smtpPort()),
this.smtpSecure(),
this.smtpAuth(),
this.smtpPhpMail()
this
);
}
@ -336,7 +299,6 @@ class DomainPopupView extends AbstractViewNext {
this.imapSecure(oDomain.IncSecure);
this.imapShortLogin(!!oDomain.IncShortLogin);
this.useSieve(!!oDomain.UseSieve);
this.sieveAllowRaw(!!oDomain.SieveAllowRaw);
this.sieveServer(oDomain.SieveHost);
this.sievePort('' + pInt(oDomain.SievePort));
this.sieveSecure(oDomain.SieveSecure);
@ -371,7 +333,6 @@ class DomainPopupView extends AbstractViewNext {
this.imapShortLogin(false);
this.useSieve(false);
this.sieveAllowRaw(false);
this.sieveServer('');
this.sievePort('4190');
this.sieveSecure(ServerSecure.None);

View file

@ -25,8 +25,6 @@ class FilterPopupView extends AbstractViewNext {
selectedFolderValue: ''
});
this.modules = SieveStore.capa;
this.fTrueCallback = null;
this.defaultOptionsAfterRender = defaultOptionsAfterRender;
@ -34,15 +32,13 @@ class FilterPopupView extends AbstractViewNext {
this.selectedFolderValue.subscribe(() => this.filter() && this.filter().actionValueError(false));
this.actionTypeOptions = ko.observableArray([]);
this.fieldOptions = ko.observableArray([]);
this.typeOptions = ko.observableArray([]);
this.typeOptionsSize = ko.observableArray([]);
this.typeOptionsBody = ko.observableArray([]);
['actionTypeOptions','fieldOptions','typeOptions','typeOptionsSize','typeOptionsBody'].forEach(
key => this[key] = ko.observableArray([])
);
initOnStartOrLangChange(this.populateOptions.bind(this));
this.modules.subscribe(this.populateOptions, this);
SieveStore.capa.subscribe(this.populateOptions, this);
}
@command()
@ -84,7 +80,7 @@ class FilterPopupView extends AbstractViewNext {
// this.actionTypeOptions.push({'id': FiltersAction.None,
// 'name': i18n('POPUPS_FILTER/SELECT_ACTION_NONE')});
const modules = this.modules();
const modules = SieveStore.capa();
if (modules) {
if (modules.includes('imap4flags')) {
this.allowMarkAsRead(true);