chore: add more rules to ensure logs consistency (#8104)

This commit is contained in:
Marcin Tojek
2023-06-21 12:00:38 +02:00
committed by GitHub
parent 1c8f564fdb
commit 4fb4c9b270
13 changed files with 65 additions and 41 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ func AuthorizeFilter[O rbac.Objecter](h *HTTPAuthorizer, r *http.Request, action
objects, err := rbac.Filter(r.Context(), h.Authorizer, roles.Actor, action, objects)
if err != nil {
// Log the error as Filter should not be erroring.
h.Logger.Error(r.Context(), "filter failed",
h.Logger.Error(r.Context(), "authorization filter failed",
slog.Error(err),
slog.F("user_id", roles.Actor.ID),
slog.F("username", roles.ActorName),