Documentation
¶
Overview ¶
Package granthttp serves a managed script's run grants on its portal page (#1846): who other than the owner may run it, and the owner's adding and withdrawing of them.
It is mounted by scripthttp, which resolves the caller and the script and refuses everybody but the script's owner and an administrator before any handler here runs. Every grant and withdrawal is audited.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct {
Grants scriptgrant.Store
// Owned resolves the script in the path for a caller who owns it, or
// writes the refusal and reports false. actor is who the caller is.
Owned func(w http.ResponseWriter, r *http.Request) (scriptID, actor string, ok bool)
// Audit records one act on the script. Nil records nothing.
Audit func(r *http.Request, tool, scriptID string, params map[string]any, opErr error)
}
Deps carries the grant store, the ownership gate and the audit writer.
Click to show internal directories.
Click to hide internal directories.