Initial commit
CI / test (push) Canceled after 0s

This commit is contained in:
2026-09-12 22:22:17 +02:00
commit 904d14b64c
314 changed files with 31884 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
package web
import (
"context"
"gardomatic.kleiax.de/lib/client"
)
type contextKey string
const (
isAuthenticatedContextKey = contextKey("isAuthenticated")
userContextKey = contextKey("user")
)
func userFromContext(ctx context.Context) (client.User, bool) {
user, ok := ctx.Value(userContextKey).(client.User)
return user, ok
}