Unified Storage: Add more debug logs to permission filtering (#99325)

add more debug logs
This commit is contained in:
owensmallwood 2025-01-21 09:34:58 -06:00 committed by GitHub
parent 2fe510eb6f
commit 6f12b8e3a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -889,6 +889,7 @@ func (q *permissionScopedQuery) Searcher(ctx context.Context, i index.IndexReade
parts := strings.Split(id, "/")
// Exclude doc if id isn't expected format
if len(parts) != 4 {
q.log.Debug("Unexpected document ID format", "id", id)
return false
}
ns := parts[0]
@ -900,6 +901,10 @@ func (q *permissionScopedQuery) Searcher(ctx context.Context, i index.IndexReade
folder = string(value)
}
})
if err != nil {
q.log.Debug("Error reading doc values", "error", err)
return false
}
if _, ok := q.checkers[resource]; !ok {
q.log.Debug("No resource checker found", "resource", resource)
return false