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

add more debug logs
This commit is contained in:
owensmallwood
2025-01-21 17:34:58 +02:00
committed by GitHub
parent 2fe510eb6f
commit 6f12b8e3a4
+5
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