Skip to content

Commit 070e4ee

Browse files
Allow sieve filter to "fileinto" INBOX
1 parent 0f6b70f commit 070e4ee

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

dev/Stores/User/Folder.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import ko from 'ko';
33
import _ from '_';
44

5+
import {settingsGet} from 'Storage/Settings';
6+
57
import {FolderType} from 'Common/Enums';
68
import {UNUSED_OPTION_VALUE} from 'Common/Consts';
79
import {isArray, folderListOptionsBuilder} from 'Common/Utils';
@@ -35,6 +37,8 @@ class FolderUserStore
3537

3638
this.currentFolder = ko.observable(null).extend({toggleSubscribeProperty: [this, 'selected']});
3739

40+
this.sieveAllowFileintoInbox = !!settingsGet('SieveAllowFileintoInbox');
41+
3842
this.computers();
3943
this.subscribers();
4044
}
@@ -117,7 +121,7 @@ class FolderUserStore
117121
this.folderMenuForFilters = ko.computed(
118122
() => folderListOptionsBuilder(
119123
this.folderListSystem(), this.folderList(),
120-
['INBOX'], [['', '']], null, null, null, (item) => (item ? item.localName() : ''))
124+
[(this.sieveAllowFileintoInbox ? '' : 'INBOX')], [['', '']], null, null, null, (item) => (item ? item.localName() : ''))
121125
);
122126
}
123127

rainloop/v/0.0.0/app/libraries/RainLoop/Actions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,6 +1531,7 @@ public function AppData($bAdmin, $bMobile = false, $bMobileDevice = false, $sAut
15311531
'DetermineUserDomain' => (bool) $oConfig->Get('login', 'determine_user_domain', false),
15321532
'UseLoginWelcomePage' => (bool) $oConfig->Get('login', 'welcome_page', false),
15331533
'StartupUrl' => \trim(\ltrim(\trim($oConfig->Get('labs', 'startup_url', '')), '#/')),
1534+
'SieveAllowFileintoInbox' => (bool) $oConfig->Get('labs', 'sieve_allow_fileinto_inbox', false),
15341535
'ContactsIsAllowed' => false,
15351536
'ChangePasswordIsAllowed' => false,
15361537
'RequireTwoFactor' => false,

rainloop/v/0.0.0/app/libraries/RainLoop/Config/Application.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ protected function defaultValues()
422422
'sieve_allow_raw_script' => array(false),
423423
'sieve_utf8_folder_name' => array(true),
424424
'sieve_auth_plain_initial' => array(true),
425+
'sieve_allow_fileinto_inbox' => array(false),
425426
'imap_timeout' => array(300),
426427
'smtp_timeout' => array(60),
427428
'sieve_timeout' => array(10),

0 commit comments

Comments
 (0)