feat: v1.3.87 — Grafana Organizations per namespace (StatsProvider + public dashboards + UI button)
This commit is contained in:
@@ -181,6 +181,13 @@ func (s *Server) handleAuth(w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Printf("handleAuth: ensureUserNS %s: %v\n", ns, ensureErr)
|
||||
}
|
||||
|
||||
// Провизируем Grafana Org для этого namespace (fire-and-forget, идемпотентно).
|
||||
go func() {
|
||||
if err := s.stats.EnsureOrgForNamespace(context.Background(), ns, identity.Email); err != nil {
|
||||
fmt.Printf("handleAuth: EnsureOrgForNamespace %s: %v\n", ns, err)
|
||||
}
|
||||
}()
|
||||
|
||||
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||
_ = json.NewEncoder(w).Encode(map[string]any{"ok": true, "env": env, "namespace": ns, "email": identity.Email})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user