mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
chore: add more rules to ensure logs consistency (#8104)
This commit is contained in:
+1
-1
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user