From 03aa64168ca1f3d54a31214f0bba9e0e4afd2313 Mon Sep 17 00:00:00 2001 From: David Christofas Date: Tue, 1 Jun 2021 13:31:51 +0200 Subject: [PATCH] fix: make groups index case sensitive --- accounts/pkg/service/v0/index.go | 4 ++-- changelog/unreleased/fix-groups-index.md | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 changelog/unreleased/fix-groups-index.md diff --git a/accounts/pkg/service/v0/index.go b/accounts/pkg/service/v0/index.go index 2af8e27b833..a2c863baa1a 100644 --- a/accounts/pkg/service/v0/index.go +++ b/accounts/pkg/service/v0/index.go @@ -63,11 +63,11 @@ func recreateContainers(idx *indexer.Indexer, cfg *config.Config) error { } // Groups - if err := idx.AddIndex(&proto.Group{}, "OnPremisesSamAccountName", "Id", "groups", "unique", nil, true); err != nil { + if err := idx.AddIndex(&proto.Group{}, "OnPremisesSamAccountName", "Id", "groups", "unique", nil, false); err != nil { return err } - if err := idx.AddIndex(&proto.Group{}, "DisplayName", "Id", "groups", "non_unique", nil, true); err != nil { + if err := idx.AddIndex(&proto.Group{}, "DisplayName", "Id", "groups", "non_unique", nil, false); err != nil { return err } diff --git a/changelog/unreleased/fix-groups-index.md b/changelog/unreleased/fix-groups-index.md new file mode 100644 index 00000000000..6e82a1660d3 --- /dev/null +++ b/changelog/unreleased/fix-groups-index.md @@ -0,0 +1,5 @@ +Bugfix: Change the groups index to be case sensitive + +Groups are considered to be case sensitive. The index must handle them case sensitive too otherwise we will have undeterministic behavior while editing or deleting groups. + +https://github.com/owncloud/ocis/pull/2109