add debug logging for user context and web render

This commit is contained in:
Christoph Kluge
2024-10-31 13:36:27 +01:00
parent c120d6517f
commit eabc6212ea
2 changed files with 13 additions and 1 deletions

View File

@@ -321,9 +321,10 @@ const ContextUserKey ContextKey = "user"
func GetUserFromContext(ctx context.Context) *schema.User {
x := ctx.Value(ContextUserKey)
if x == nil {
log.Warnf("no user retrieved from context")
return nil
}
log.Infof("user retrieved from context: %v", x.(*schema.User))
return x.(*schema.User)
}