From 37c05f7ddd0df08205a27a6e87e09128014d24dc Mon Sep 17 00:00:00 2001 From: Ben Brooks Date: Thu, 13 May 2021 17:34:52 +0100 Subject: [PATCH] Fix incorrect config property used in grants per doc warning threshold (#4999) --- db/crud.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/crud.go b/db/crud.go index e2cc9cfb71..0370ef2e31 100644 --- a/db/crud.go +++ b/db/crud.go @@ -1915,7 +1915,7 @@ func (db *Database) checkDocChannelsAndGrantsLimits(docID string, channels base. } // Warn when grants are larger than a configured threshold - if grantThreshold := db.Options.UnsupportedOptions.WarningThresholds.ChannelsPerDoc; grantThreshold != nil { + if grantThreshold := db.Options.UnsupportedOptions.WarningThresholds.GrantsPerDoc; grantThreshold != nil { grantCount := len(accessGrants) + len(roleGrants) if uint32(grantCount) >= *grantThreshold { db.DbStats.Database().WarnGrantsPerDocCount.Add(1)