Documentation
¶
Overview ¶
Package grantsource is where a caller's write grants on Global folders are read from (#2684): the source the platform installs once at startup, and the SQL form of the path-segment rule a grant covers its folder by. It is a package of its own so pkg/resource's public surface carries neither.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Install ¶
func Install(src Source)
Install sets the source grants are read from; nil uninstalls it.
func UnderSQL ¶
UnderSQL is resource.PathUnder as a SQL predicate over two text expressions: path is the column or parameter tested, folder the one it must lie beneath, by path segment. The grants, the folder moves that rewrite them and a site's media mounts all read it, so the Go check and the SQL agree.
Types ¶
type Grantee ¶
type Grantee struct {
Subject string
Email string
// Personas is every persona the person's roles reach, the membership a
// persona library is read by: a grant to any of them covers the person.
Personas []string
}
Grantee is who a grant lookup is for: the person by subject and address, and every persona their roles reach.