Skip to content

Commit 63c35a5

Browse files
committed
config/shared_mailboxes: Add acl_dict_index usage for sql
Remove the old to_user index, because it's already indexed as part of the primary key.
1 parent c64dfe4 commit 63c35a5

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

docs/core/config/shared_mailboxes.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,8 @@ acl_sharing_map {
365365
}
366366
}
367367
368+
acl_dict_index = yes
369+
368370
dict_server {
369371
dict acl {
370372
driver = sql
@@ -391,6 +393,19 @@ dict_server {
391393
}
392394
}
393395
396+
dict_map shared/shared-user-boxes-rev/$from/$to {
397+
sql_table = user_shares
398+
value_field dummy {
399+
}
400+
401+
key_field from_user {
402+
value = $from
403+
}
404+
key_field to_user {
405+
value = $to
406+
}
407+
}
408+
394409
dict_map shared/shared-boxes/anyone/$from {
395410
sql_table = anyone_shares
396411
value_field dummy {
@@ -413,8 +428,8 @@ CREATE TABLE user_shares (
413428
);
414429
COMMENT ON TABLE user_shares IS 'User from_user shares folders to user to_user.';
415430
416-
CREATE INDEX to_user
417-
ON user_shares (to_user); -- because we always search for to_user
431+
CREATE INDEX user_shares_from_user
432+
ON user_shares (from_user); -- because we search for from_user when rebuilding ACLs
418433
419434
CREATE TABLE anyone_shares (
420435
from_user varchar(100) not null,

0 commit comments

Comments
 (0)