Documentation
¶
Overview ¶
Package formpublishwire mounts what a form's owner publishes it with (#2494): the preview the script page opens, and the Approvals queue (#2437) a public form's version is approved through, with the emails each request and decision sends.
Index ¶
- func Actor(isAdmin func([]string) bool, personaOf func([]string) string) func(r *http.Request) *approval.Actor
- func Approvers(users Users, isAdmin func([]string) bool, configured ...string) func(ctx context.Context) []string
- func Mount(mux *http.ServeMux, p *platform.Platform, d Deps)
- func Opener(isAdmin func([]string) bool) func(r *http.Request) *eppreview.Opener
- type Bridge
- type Deps
- type Notifier
- type Users
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Actor ¶
func Actor(isAdmin func([]string) bool, personaOf func([]string) string) func(r *http.Request) *approval.Actor
Actor is the portal caller as an approval actor, nil when signed out.
func Approvers ¶
func Approvers(users Users, isAdmin func([]string) bool, configured ...string) func(ctx context.Context) []string
Approvers lists the administrators to notify, each once: the people whose roles, as their identity provider last reported them, make them administrators, and the configured addresses.
Types ¶
type Bridge ¶
type Bridge interface {
NotifyApprovalRequest(ctx context.Context, approvers []string, a notifydelivery.AccessNotice)
NotifyApprovalDecision(ctx context.Context, a notifydelivery.AccessNotice)
}
Bridge sends the portal's emails (notifydelivery.PortalNotifier).
type Deps ¶
type Deps struct {
Wrap func(http.Handler) http.Handler
IsAdmin func([]string) bool
Notify *notifydelivery.Handle
}
Deps is what the routes are mounted with.
Click to show internal directories.
Click to hide internal directories.