{{define "pgcreds"}}{{template "base" .}}{{end}} {{define "title"}}PG Credentials — MCIAS{{end}} {{define "content"}} {{if .Creds}}

Your Credentials

{{range .Creds}}
Service Account
{{.ServiceUsername}}
Host
{{.PGHost}}:{{.PGPort}}
Database
{{.PGDatabase}}
Username
{{.PGUsername}}
Updated
{{formatTime .UpdatedAt}}
{{/* Grant management — only for the credential owner */}} {{$credID := .ID}} {{$svcUUID := .ServiceAccountUUID}} {{$grants := index $.CredGrants $credID}} {{if isPGCredOwner $.ActorID .}}

Access Grants

{{if $grants}} {{range $grants}} {{end}}
UserGranted
{{.GranteeName}} {{formatTime .GrantedAt}}
{{else}}

No access grants.

{{end}} {{/* Plain POST grant form with redirect back to /pgcreds */}}
{{end}}
View Account
{{end}}
{{else}}

No Postgres credentials are accessible to your account.

{{end}}

New Credentials

{{end}}