Skip to content

Commit c807314

Browse files
committed
shared_mailboxes: Add acl_dict_index
1 parent 30e8fe0 commit c807314

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

source/configuration_manual/shared_mailboxes/shared_mailboxes.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ Using SQL dictionary
172172

173173
plugin {
174174
acl_shared_dict = proxy::acl
175+
acl_dict_index = yes # v2.3.21.1.4 and later only
175176
}
176177

177178
dict {
@@ -192,8 +193,8 @@ Database tables:
192193
);
193194
COMMENT ON TABLE user_shares IS 'User from_user shares folders to user to_user.';
194195

195-
CREATE INDEX to_user
196-
ON user_shares (to_user); -- because we always search for to_user
196+
CREATE INDEX user_shares_from_user
197+
ON user_shares (from_user); -- because we search for from_user when rebuilding ACLs
197198

198199
CREATE TABLE anyone_shares (
199200
from_user varchar(100) not null,
@@ -218,6 +219,17 @@ Database tables:
218219
}
219220
}
220221

222+
map {
223+
pattern = shared/shared-user-boxes-rev/$from/$to
224+
table = user_shares
225+
value_field = dummy
226+
227+
fields {
228+
from_user = $from
229+
to_user = $to
230+
}
231+
}
232+
221233
map {
222234
pattern = shared/shared-boxes/anyone/$from
223235
table = anyone_shares

source/settings/plugin/acl-plugin.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ Settings
7171
INBOX's.
7272

7373

74+
.. dovecot_plugin:setting:: acl_dict_index
75+
:added: v2.3.21.1.4
76+
:default: no
77+
:plugin: acl
78+
:values: @boolean
79+
80+
Should ACL dict updates assume that there is a reverse lookup index. This
81+
should be used with SQL/CQL based dicts.
82+
83+
7484
.. dovecot_plugin:setting:: acl_globals_only
7585
:added: v2.2.31
7686
:default: no

0 commit comments

Comments
 (0)